Comments (3)
Hello,
same kind of issue when reching the sitemap.xml page with plugin version 5.0.0
Here is the log :
[2023-10-13 08:27:21] grav.CRITICAL: syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) - Trace: #0 ./htdocs/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/srv/d_utagawav...') #1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Grav\\Plugin\\Sit...') #2 ./htdocs/user/plugins/sitemap/sitemap.php(159): spl_autoload_call('Grav\\Plugin\\Sit...') #3 ./htdocs/vendor/symfony/event-dispatcher/EventDispatcher.php(264): Grav\Plugin\SitemapPlugin->onPagesInitialized(Object(RocketTheme\Toolbox\Event\Event), 'onPagesInitiali...', Object(Symfony\Component\EventDispatcher\EventDispatcher)) #4 ./htdocs/vendor/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'onPagesInitiali...', Object(RocketTheme\Toolbox\Event\Event)) #5 ./htdocs/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'onPagesInitiali...', Object(RocketTheme\Toolbox\Event\Event)) #6 ./htdocs/system/src/Grav/Common/Grav.php(597): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(RocketTheme\Toolbox\Event\Event), 'onPagesInitiali...') #7 ./htdocs/system/src/Grav/Common/Processors/PagesProcessor.php(53): Grav\Common\Grav->fireEvent('onPagesInitiali...', Object(RocketTheme\Toolbox\Event\Event)) #8 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\PagesProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #9 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #10 ./htdocs/system/src/Grav/Common/Processors/TwigProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #11 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\TwigProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #12 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #13 ./htdocs/system/src/Grav/Common/Processors/AssetsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #14 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\AssetsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #15 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #16 ./htdocs/system/src/Grav/Common/Processors/SchedulerProcessor.php(40): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #17 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\SchedulerProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #18 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #19 ./htdocs/system/src/Grav/Common/Processors/BackupsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #20 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\BackupsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #21 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #22 ./htdocs/system/src/Grav/Common/Processors/TasksProcessor.php(69): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #23 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\TasksProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #24 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #25 ./htdocs/system/src/Grav/Common/Processors/RequestProcessor.php(64): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #26 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\RequestProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #27 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #28 ./htdocs/system/src/Grav/Common/Processors/ThemesProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #29 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\ThemesProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #30 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #31 ./htdocs/system/src/Grav/Common/Processors/PluginsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #32 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\PluginsProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #33 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #34 ./htdocs/system/src/Grav/Common/Processors/InitializeProcessor.php(130): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #35 ./htdocs/system/src/Grav/Common/Debugger.php(546): Grav\Common\Processors\InitializeProcessor::Grav\Common\Processors\{closure}() #36 ./htdocs/system/src/Grav/Common/Processors/InitializeProcessor.php(131): Grav\Common\Debugger->profile(Object(Closure)) #37 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Common\Processors\InitializeProcessor->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #38 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #39 ./htdocs/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php(40): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #40 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(50): Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport->process(Object(Nyholm\Psr7\ServerRequest), Object(Grav\Framework\RequestHandler\RequestHandler)) #41 ./htdocs/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(62): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #42 ./htdocs/system/src/Grav/Common/Grav.php(312): Grav\Framework\RequestHandler\RequestHandler->handle(Object(Nyholm\Psr7\ServerRequest)) #43 ./htdocs/index.php(47): Grav\Common\Grav->process() #44 {main} [] []
from grav-plugin-sitemap.
@rhukster I still get this error on 5.0.0
I don't know PHP but I'll happily try to dig into this if you provide some pointers.
Thanks for your help.
from grav-plugin-sitemap.
I replaced
grav-plugin-sitemap/classes/SitemapEntry.php
Lines 17 to 20 in 8b8a402
with
public $timestamp;
public $rawroute;
public $longdate;
public $shortdate;
And now it seems to work.
Did some Googling, found out that the type hints you're using require PHP 7.4 but Grav only requires PHP 7.3.6.
This plugin does not specify it requires PHP 7.4+, so I'll make a PR to remove the type hints.
from grav-plugin-sitemap.
Related Issues (20)
- Missing translations in JSON sitemap HOT 2
- Avoid flex objects from indexing
- Children pages under an unpublished blog will show up in sitemap
- Suggestion: location url -> change domain based on language
- attachments HOT 1
- Default Page is HTML not XML HOT 2
- canonical tag for sitemap.xml HOT 4
- sitemap-news.xml Page Redirects to 404 HOT 2
- Wrong file name for SitemapEntry.php HOT 11
- Wrong file name for SitemapEntry.php > Grav\Plugin\Sitemap\SitemapEntry HOT 2
- Invalid root element, missing trailing slash HOT 2
- Alternative replacement for ignore:true, using visible or published HOT 1
- Invalid namespace according to google console HOT 2
- All languages on the same map: by default or not? HOT 7
- Related items not grouped in sitemap HOT 5
- Problem with a multilanguage sitemap HOT 1
- Error with multilingual one-page website HOT 3
- Sitemap blanked out problem HOT 10
- Way to provide an override for sitemap's lastmod HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grav-plugin-sitemap.