Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sitemap.xml return 503 when not loggedin #11

Closed
jlachancekffein opened this issue Aug 13, 2019 · 12 comments
Closed

sitemap.xml return 503 when not loggedin #11

jlachancekffein opened this issue Aug 13, 2019 · 12 comments
Assignees

Comments

@jlachancekffein
Copy link

I use the plugin to generate a sitemap for a site.

Everything works correctly when the user is connected to the control panel.

However, if the user is not connected (example a robot), the url returns a 503 - Service unavailable error.

The url used is http://example.com/sitemap.xml

Is there a configuration to put in place to make functional?

Thanks for your help !

Informations:
Craft version : Craft CMS 3.2.9
Plugin version : 1.0.0

Capture d’écran 2019-08-13 à 11 26 53

@janhenckens janhenckens self-assigned this Aug 13, 2019
@janhenckens
Copy link
Member

Hey there,

I can't reproduce the issue for an anonymous request on any of my test sites. Are you running any other plugins on the site?

@jlachancekffein
Copy link
Author

Hi,

Here the composer require list :

"craftcms/cms": "^3.0.0",
"vlucas/phpdotenv": "^2.4.0",
"nesbot/carbon": "^1.38",
"firebase/php-jwt": "^5.0",
"guzzlehttp/guzzle": "^6.3",
"drewm/mailchimp-api": "^2.5",
"craftcms/redactor": "^2.0.1",
"spicyweb/craft-neo": "^2.3.5",
"spicyweb/craft-fieldlabels": "^1.1.1",
"chasegiunta/craft-jason": "^1.0.2",
"verbb/field-manager": "^2.1.0",
"craftcms/mailgun": "^1.4.2",
"ostark/craft-async-queue": "^2.0",
"lukeyouell/craft-hideadmin": "^1.0",
"doublesecretagency/craft-cpbodyclasses": "^2.1.0",
"mmikkel/incognito-field": "^1.1.1.1",
"verbb/expanded-singles": "^1.0.7",
"nystudio107/craft-imageoptimize": "^1.5.5",
"studioespresso/craft-seo-fields": "^1.0",
"supercool/tablemaker": "^2.0",
"kffein/craft-koddein-fields": "^1.3"

@janhenckens
Copy link
Member

Thanks for the extra info.

Could you try uninstalling the plugin and then try to access that url again? Does it still throw the 503?

@jlachancekffein
Copy link
Author

Hi,

Good idea. But now it return 404 error. That make sense.

Here the complete error stack

image

@janhenckens
Copy link
Member

Check. Could you try changing your sitemap settings? Maybe try just enabling 1 section (a homepage single or something like that) and see it still crashes?

@jlachancekffein
Copy link
Author

Still crash !

@jlachancekffein
Copy link
Author

It's really weird because in SeoFields.php

if ($shouldRender) {
                    $event->rules = array_merge($event->rules, [
                        'sitemap.xml' => 'seo-fields/sitemap/render',
                        'sitemap_<siteId:\d>_<type:(entry|product|category)>_<sectionId:\d>_<handle:.*>.xml' => 'seo-fields/sitemap/detail'
                    ]);
                }

The $shouldRender condition is met and the rules is add to the listed rules...

For an unknown reason, if i'm not connected to CP, the rules do not apply....

@janhenckens
Copy link
Member

I reinstalled the plugin on my test install and now I'm having the same issue. Diving in :)
I'll try to get back to you asap!

@jlachancekffein
Copy link
Author

Not a good news but at least it will be easier for you to find a solution. :)

Thank you for the follow up.

@janhenckens
Copy link
Member

Just published an update that should address this. Could you give it a try and let me know if it works now?
Thanks!

@jlachancekffein
Copy link
Author

Thank you so much.

Now it work without problems.

@janhenckens
Copy link
Member

Great! Let me know if you run into anything else, happy to help out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants