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

Fixed sitemap generation for multiple frontend locales #3218

Merged
merged 2 commits into from
Jul 15, 2016

Conversation

sintro
Copy link

@sintro sintro commented Jul 14, 2016

Fixes to sitemap/index.xml.builder for correct generation when multiple frontend locales are activated.
More info in this #3215 issue.

filter.around_generate({}) do
raw_url
end
end
Copy link
Member

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.

Copy link
Author

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.

@parndt
Copy link
Member

parndt commented Jul 15, 2016

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
Copy link
Author

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?

@parndt
Copy link
Member

parndt commented Jul 15, 2016

Good enough for me - @bricesanchez ?

@bricesanchez
Copy link
Member

bricesanchez commented Jul 15, 2016

@sintro Could you squash and rebase your branch ?

@bricesanchez bricesanchez added this to the 3.0.4 milestone Jul 15, 2016
@bricesanchez bricesanchez self-assigned this Jul 15, 2016
@parndt parndt merged commit 38340e1 into refinery:master Jul 15, 2016
@parndt
Copy link
Member

parndt commented Jul 15, 2016

Done as a merge step

bricesanchez pushed a commit that referenced this pull request Jul 16, 2016
* Fixed sitemap generation for multiple frontend locales

* Added else case to return correct url when there are 1 frontend locale
bricesanchez pushed a commit that referenced this pull request Jul 16, 2016
* Fixed sitemap generation for multiple frontend locales

* Added else case to return correct url when there are 1 frontend locale
bricesanchez pushed a commit that referenced this pull request Nov 29, 2016
and refactor the builder to be more readable
parndt pushed a commit that referenced this pull request Dec 11, 2016
and refactor the builder to be more readable
bricesanchez pushed a commit that referenced this pull request Aug 14, 2017
and refactor the builder to be more readable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants