Comments (17)
Could you let me know what version of Craft you're running and whether this is a fresh install or an update?
Also, and extra details you can get from your logs / devMode would be great!
from seo.
Thanks for getting back to me so quickly Tam! It's a site I've recently taken over, not a fresh install. Craft version 2.6.2991. PHP 7.1.12 on DigitalOcean.
Stack trace:
Next Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Craft\Seo_SitemapRecord and its behaviors do not have a method or closure named "enabled".") in "seo/sitemap" at line 86. in /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php:230
Stack trace:
#0 /srv/users/serverpilot/apps/appname/craft/storage/runtime/compiled_templates/40/4067161133a49915097fb83244090b551f25c3ce0b9aa4cbec73d14f58d98c6f.php(740): Twig_Template->displayBlock('content', Array, Array)
#1 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(215): __TwigTemplate_d42e4b425195cdcabf22f971b584ede74542d0a0cf6df392820180189839d64f->block_body(Array, Array)
#2 /srv/users/serverpilot/apps/appname/craft/storage/runtime/compiled_templates/53/531e484b9108f0c902222391cdedafa979899e24f996783437b82b5f1d06501c.php(45): Twig_Template->displayBlock('body', Array, Array)
#3 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_be966d9ddf0c3323fb35201abadc46b781d2145b65316e4dfc96aa08dd39c177->doDisplay(Array, Array)
#4 /srv/users/serverpilot/apps/appname/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
#5 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
#6 /srv/users/serverpilot/apps/appname/craft/storage/runtime/compiled_templates/87/872ac43537ea01039c11db94577ee8cbe0f14eeff35f3fba4cb70d8b0629ed1a.php(131): Twig_Template->display(Array, Array)
#7 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_c22b4e9af641498b0c4d890d09f61c371745e5007d0af8cf5ec7f5c22f0b8bd7->doDisplay(Array, Array)
#8 /srv/users/serverpilot/apps/appname/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
#9 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
#10 /srv/users/serverpilot/apps/appname/craft/storage/runtime/compiled_templates/40/4067161133a49915097fb83244090b551f25c3ce0b9aa4cbec73d14f58d98c6f.php(169): Twig_Template->display(Array, Array)
#11 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_d42e4b425195cdcabf22f971b584ede74542d0a0cf6df392820180189839d64f->doDisplay(Array, Array)
#12 /srv/users/serverpilot/apps/appname/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
#13 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
#14 /srv/users/serverpilot/apps/appname/craft/storage/runtime/compiled_templates/f9/f92921d206b2db16ecd9448ed7bab6c71620cc7fbbe3b6551088e288b27dbfbe.php(36): Twig_Template->display(Array, Array)
#15 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_06c12da64c481cf48895f25d62d4c9b7399ae911a891ab96e1012aacb562fb25->doDisplay(Array, Array)
#16 /srv/users/serverpilot/apps/appname/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
#17 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
#18 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array)
#19 /srv/users/serverpilot/apps/appname/craft/app/vendor/twig/twig/lib/Twig/Environment.php(362): Twig_Template->render(Array)
#20 /srv/users/serverpilot/apps/appname/craft/app/services/TemplatesService.php(256): Twig_Environment->render('seo/sitemap', Array)
#21 /srv/users/serverpilot/apps/appname/craft/app/controllers/BaseController.php(74): Craft\TemplatesService->render('seo/sitemap', Array)
#22 /srv/users/serverpilot/apps/appname/craft/plugins/seo/controllers/SeoController.php(82): Craft\BaseController->renderTemplate('seo/sitemap', Array)
#23 /srv/users/serverpilot/apps/appname/craft/app/framework/web/actions/CInlineAction.php(49): Craft\SeoController->actionSitemapPage()
#24 /srv/users/serverpilot/apps/appname/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#25 /srv/users/serverpilot/apps/appname/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
#26 /srv/users/serverpilot/apps/appname/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#27 /srv/users/serverpilot/apps/appname/craft/app/framework/web/CWebApplication.php(282): CController->run('sitemapPage')
#28 /srv/users/serverpilot/apps/appname/craft/app/framework/web/CWebApplication.php(141): CWebApplication->runController('seo/sitemapPage')
#29 /srv/users/serverpilot/apps/appname/craft/app/etc/web/WebApp.php(290): CWebApplication->processRequest()
#30 /srv/users/serverpilot/apps/appname/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#31 /srv/users/serverpilot/apps/appname/craft/app/index.php(62): CApplication->run()
#32 /srv/users/serverpilot/apps/appname/public/index.php(19): require_once('/srv/users/serv...')
#33 {main}
REQUEST_URI=/admin/seo/sitemap
HTTP_REFERER=https://www.[website].com/admin/seo/redirects
from seo.
Can you replace the all the files for the plugin with a fresh download (you shouldn't need to reinstall the plugin)? You might also need to delete the craft/storage/runtime/compiled_templates
directory.
from seo.
Yep - I've uploaded the files manually. Additionally, git didn't recognise any files as changed or added.
from seo.
Is it still erroring even with after the compiled_templates
directory has been deleted?
Could you also confirm that this line exists in craft/plugins/seo/records/Seo_SitemapRecord.php
on your server?
seo/seo/records/Seo_SitemapRecord.php
Line 29 in aa706be
from seo.
Yes - still happens after clearing that folder. Line 29 is in there same as the source.
from seo.
Weird. Are you able to replicate the issue in a local environment?
from seo.
Yep - happens on my local machine too!
from seo.
Are you able to send me (tam at ethercreative.co.uk) your site files and a database dump?
from seo.
Unfortunately not, sorry! Aside from the fact that the database is 300mb, it contains a lot of customer data.
from seo.
No worries! Hearing about your 300mb database is making me feel a LOT better about some of my sites 🤣
Could you check that the structure of the craft_seo_sitemaps
has the enabled
column? It might also be worth backing up that table and emptying it to see if it's an issue with the data.
from seo.
Thanks for prompting me to look at the database - it did have the enabled column, but three of the sections were set to NULL. Here's the situation.
Originally the table in the db looked like this:
Then I changed the NULL values to 0, and the plugin started working again, but it didn't bear any resemblance to the values in the table (19 rows in the db, 13 sections):
Then I clicked Save from within the plugin in Craft, and the database table updated to this:
Which DOES seem to relate to the correct sections etc. So I couldn't tell you how, but it looks like that table got corrupted at some point?
from seo.
Having said that, it looks like the actual sitemap still isn't working: https://www.sitename.com/sitemap.xml
from seo.
The only section which doesn't seem to be appearing in the sitemap is, I believe, the Programs section. The URL 404s so which leads me to believe there aren't any enabled entries? The latest v2 release fixed #52 where the sitemap was including entries that were disabled, so this seems like the reason why that section isn't showing up.
from seo.
Thanks Tam - sorry, I've inherited this project and this plugin so I may not be expecting the right thing... but shouldn't the sitemap be listing pages inside those sections? I shouldn't be seeing this in the sitemap.xml:
<sitemap>
<loc>
https://www.sitename.com/sitemap_sections_12_0.xml
</loc>
<lastmod>2017-10-17</lastmod>
</sitemap>
I'm expecting to see a list of pages inside whatever that section is?
from seo.
To help reduce server load the sitemap is split into separate files, each file containing the entries for that files section (try going to https://www.guidedogs.com/sitemap_sections_12_0.xml). These files can be separated into even more files, depending on the total number of entries and the page limit specified in the plugin settings (defaults to 1000, but can be lowered for servers with fewer resources).
from seo.
Ah! Ok, that makes sense - thank you for all the investigating.
from seo.
Related Issues (20)
- Spacing bug between page title and site name HOT 3
- Below is a rendering of the page up to the first error HOT 1
- Possible remote file inclusion
- Default page description in settings & entries are different HOT 7
- og:url and twitter:url referencing Blitz cache token HOT 2
- Unable to find the template “seo/_seo/fieldtype”. HOT 4
- Generated link doesn't match with expected link HOT 2
- [FR] Dynamic Title Insertion
- URL is shown twice in snippet preview HOT 2
- Many calls to /index.php?=admin/actions/seo/seo/render-data while editing a section
- XML Sitemap not shown HOT 1
- Dynamic tags in SEO Title field are not saved when creating a new entry
- Craft 5 support? HOT 1
- Problem with canonical HOT 6
- PHP Compile Error on sitemap page HOT 8
- SEO setting does not save page title tokens. HOT 3
- Multi-language site's url is not on the sitemap
- Slow redirect back-end
- 502 error caused when saving entry with validation errors whilst using the plugin HOT 1
- Entry title not being used for SEO page title HOT 6
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 seo.