-
-
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
Fixed sitemap generation for multiple frontend locales #3218
Conversation
filter.around_generate({}) do | ||
raw_url | ||
end | ||
end |
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.
It doesn't seem like raw_url
is being returned anymore if this condition fails, as it's not being returned in the else
case.
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.
You are right! Need to add else case to return raw_url without changes, or do some refactoring to get more effective correct code.
Thanks for taking a look at this! |
@@ -17,6 +17,8 @@ xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do | |||
filter.around_generate({}) do | |||
raw_url | |||
end | |||
else | |||
raw_url |
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.
So, here is the fix, may be there are any better way to do it?
Good enough for me - @bricesanchez ? |
@sintro Could you squash and rebase your branch ? |
Done as a merge step |
* Fixed sitemap generation for multiple frontend locales * Added else case to return correct url when there are 1 frontend locale
* Fixed sitemap generation for multiple frontend locales * Added else case to return correct url when there are 1 frontend locale
and refactor the builder to be more readable
and refactor the builder to be more readable
and refactor the builder to be more readable
Fixes to sitemap/index.xml.builder for correct generation when multiple frontend locales are activated.
More info in this #3215 issue.