refinerycms-blog icon indicating copy to clipboard operation
refinerycms-blog copied to clipboard

Fix error when clicking on 'save & continue' then changing locale

Open cedrtang opened this issue 7 years ago • 5 comments

I noticed a bug when using different locales and saving using the "Save & continue editing" button: the URL of the locales switch picker got undefined and an error occur.

The fix is to apply the same behavior as Pages in Refinery using the JS function 'submit_and_continue' in admin.js.erb that changes the locale switch picker URL. If we send back the correct URL parameters after a Post update, it works correctly.

cedrtang avatar Jun 08 '18 00:06 cedrtang

Thanks for your contribution!

Could you add a test to confirm your bugfix?

bricesanchez avatar Jun 08 '18 02:06 bricesanchez

@bricesanchez Sure, no problem. It does require javascript in the capybara test to run correctly. Which js driver do you run in your CI environment?

cedrtang avatar Jun 08 '18 02:06 cedrtang

@cedrtang we're using the Poltergeist gem, so phantomjs

parndt avatar Jul 09 '18 22:07 parndt

We are now using Chrome headless :D https://github.com/refinery/refinerycms/pull/3394

bricesanchez avatar Sep 05 '18 15:09 bricesanchez

Hi, I'm having this problem. Include the blog today and I came across this URL failure

captura de tela de 2018-11-06 18-31-53

By hovering over the "Producto" menu option, the link is wrong. Even clicking "save" and not "save & continue" to save the page the error continues.

TonhaoSantos avatar Nov 06 '18 20:11 TonhaoSantos