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

Sidebar below edit form when using multiple languages #59

Closed
mrlch opened this issue Sep 13, 2023 · 8 comments · Fixed by #112
Closed

Sidebar below edit form when using multiple languages #59

mrlch opened this issue Sep 13, 2023 · 8 comments · Fixed by #112

Comments

@mrlch
Copy link

mrlch commented Sep 13, 2023

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
Bildschirmfoto 2023-09-13 um 17 14 39

Adding second language
Bildschirmfoto 2023-09-13 um 17 15 02

Sidebar at the wrong place
Bildschirmfoto 2023-09-13 um 17 15 22

go back to one language
Bildschirmfoto 2023-09-13 um 17 19 22

Edit form is back at the right place
Bildschirmfoto 2023-09-13 um 17 20 57

@laryn
Copy link
Member

laryn commented Sep 15, 2023

@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:

CleanShot 2023-09-14 at 19 20 52@2x

@laryn
Copy link
Member

laryn commented Dec 14, 2023

I wonder if you have a contrib module that's breaking some things @mrlch -- which contrib modules do you have enabled?

@olafgrabienski
Copy link
Member

olafgrabienski commented Jan 25, 2024

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.

@olafgrabienski
Copy link
Member

olafgrabienski commented Jan 26, 2024

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.

@olafgrabienski
Copy link
Member

@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 like de/node/add/page. In this case, the sidebar moves below the editor.

@laryn
Copy link
Member

laryn commented Feb 6, 2024

@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.

laryn added a commit to laryn/gin that referenced this issue Feb 25, 2024
laryn added a commit that referenced this issue Feb 25, 2024
@laryn
Copy link
Member

laryn commented Feb 25, 2024

@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 pushed a commit to laryn/gin that referenced this issue Feb 25, 2024
@olafgrabienski
Copy link
Member

olafgrabienski commented Feb 26, 2024

@laryn I've tested the commit on one of my sites, and it fixes the issue for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants