Closed mrlch closed 9 months ago
@mrlch Can you provide specific steps to reproduce this on a fresh vanilla installation? I tried enabling another language and allowing multilingual options on a content type, but it doesn't cause the same issue:
I wonder if you have a contrib module that's breaking some things @mrlch -- which contrib modules do you have enabled?
Today I've encountered the issue with the sidebar moved below the editor on a new multilingual site I'm building. To reproduce the issue, I've set up a fresh demo site, installed the same modules and used the same multilingual options. At first sight without luck, but then I found the thing which makes the difference: a path prefix like en
or de
.
If you have enabled URL language detection at admin/config/regional/language/detection/url
to use a path prefix for one or more languages, the path for adding a page will be something like de/node/add/page
. In this case, the sidebar moves below the editor.
To verify the difference, leave the default language without path prefix and add a page using the path node/add/page
. Now the sidebar should behave as expected.
When I compare the Create page form in the browser dev tools, it looks like the form with the sidebar issue is missing some styles from gin/dist/css/components/edit_form.css
. On a form where the sidebar moves below the editor, the CSS definitions around line 40, 103 and 117 are missing.
@mrlch and @laryn, I'm curious if you can confirm my findings from two weeks ago:
If you have enabled URL language detection at
admin/config/regional/language/detection/url
to use a path prefix for one or more languages, the path for adding a page will be something likede/node/add/page
. In this case, the sidebar moves below the editor.
@olafgrabienski I haven't had a chance to verify but it looks like helpful steps to test -- I'll let you know as soon as I'm able to give it a try.
@mrlch @olafgrabienski I've made a commit that should take care of this -- thanks for the report and the steps to reproduce! If the fix I've added doesn't solve it for you let me know, but it was all that was needed in my testing to make sure we didn't consider the language code as part of the URL when checking if we were editing a page.
@laryn I've tested the commit on one of my sites, and it fixes the issue for me. Thank you!
I reported in a previous issue that the sidebar is on some installations at the wrong place.
Now I know what causes the issue.
When I install a second language the sidebar moves down.
Editform with only one language installed
Adding second language
Sidebar at the wrong place
go back to one language
Edit form is back at the right place