-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix #3218 regression on sitemap: don't duplicate locale in url #3271
Conversation
and refactor the builder to be more readable
@sintro Could you test this PR ? |
Just checked, your patch works fine for my cases, so it breaks nothing. But I also did not have such problems, probably, you get it when the path of page has manually set /language/ part? I think now with this PR everything is fine! One thing about this sitemap generation: what about filtering out the pages with that locales, which don't have translations for that language (for example, empty body or title or both)? |
The sitemap problem was on extensions urls, no pages url.
It's already done by the refinerycms/pages/app/models/refinery/page.rb Line 121 in 2c3b7c3
|
Strangely, but I always get all of the pages with all of frontend_locales... Even for pages, which even does not have that locale symbol in Pages section in admin panel (so, there are no title and no body). |
Is there something missing to merge this PR? |
@mhtremblay everything is fine. At least, new sitemap.xml.erb is better than older. |
Can someone merge this PR plz? |
# exclude sites that are external to our own domain. | ||
page_url = if page.url.is_a?(Hash) | ||
# This is how most pages work without being overriden by link_url | ||
page.url.merge({:only_path => false, locale: locale}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
page.url.merge({only_path: false, locale: locale})
Fix #3218 regression: don't duplicate locale in url and refactor the builder to be more readable
Since this PR, i have problems on sitemap:
After the fix: