RTL looks good, but hovering over top level menu items shows no dropdowns... No JS error at all. In Firebug I see the

    style change from left:-999 to left:auto, but Im wondering if this should be reversed, e.g. right:-999 to right:auto?
Files: 
CommentFileSizeAuthor
#86 border.png2.31 KBhejazee
#74 admin_menu-fix_rtl_dropdown_with_admin_menu_toolbar_also-725840-74.patch502 bytessamaphp
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#57 admin_menu-fix_rtl-725840-57.patch4.29 KBRoySegall
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#46 patch_for_hebrew_admin_menu.patch1020 byteszvischutz
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch patch_for_hebrew_admin_menu.patch. Unable to apply patch. See the log in the details link for more information. View
#44 admin_menu.zip4.06 KBbloggz
#42 admin_menu-7.x-3.x-RTL-fix.tar_.gz53.8 KBtsi
#33 admin_menu-fix_rtl-725840-33.patch6.45 KBhejazee
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#34 admin_menu-fix_rtl-725840-34.patch6.5 KBhejazee
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#30 admin_menu.rtl_.30.patch4.74 KBsun
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#24 admin_menu-rtlsupport-725840-2.patch3.81 KBnavid.kashani
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#22 admin_menu-rtlsupport-1.patch3.76 KBnavid.kashani
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View
#12 admin_menu.zip104.2 KBKhai Heller
#13 admin_menu.zip104.19 KBKhai Heller
#8 admin_menu-rtl.zip659 bytesW.M.

Comments

Mathijs Koenraadt’s picture

I've found out that the JavaScript part messes up the offSetLeft value (position) for the dropdown menu div. In LRT a value may be offSetLeft: 318, the same menu in RTL gets a value of offSetLeft: -90 (clearly, that means off screen).

Have to dig deeper to find the wrong calculation.

nimazuk’s picture

same problem.
In RTL languages FF3.6 does not expand sub-menus.
It works fine in IE7.

Oren_Held’s picture

The whole off-left method is very bad for RTL. I suggest changing it to off-top instead.
For more details, see a post I've just wrote about this issue http://www.held.org.il/blog/?p=260

sun’s picture

My experience with RTL is limited. First of all, I need qualified input.

In LTR, elements that exceed the max-width of BODY cause a horizontal scrollbar. Therefore right: -999em does not work.

Do browsers flip the entire rendering logic? So aforementioned right: -999em will not cause a scrollbar, but left: -999em will? (I doubt that + recall that I tested it once)

If they are not, then this issue is caused by our RTL styles, but the involved JS does not account for the flipped RTL styles. This means that we need to update the JS to remove the styles instead of resetting them to auto.

W.M.’s picture

I experience the same with Administration menu 6.x-3.0-alpha4 on a RTL site. I hope that this will be fixed in future releases. It looks like a nice add on.

W.M.’s picture

Where do you think the problem is located ?! The js file or the rtl css file ?!

W.M.’s picture

I would happily test any suggestions / patches. This is a great module and I think we should work together on making it available to all people / all languages.

I am sure the problem is caused by a minor specification in the current code. It shows perfectly but no dropdown on RTL sites.

W.M.’s picture

Finally SOLVED!

This solution concerns the latest dev version for Drupal SEVEN (November 14th):

a. Replace every "left" with "right" inside the admin_menu.js file

b. I have made small modification to the "admin_menu-rtl.css" file. Look at the attachment. Replace yours with this one.

Developers: please review and see if there are more professional ways to do this.

Admin menu on RTL ! Finally !

Tested with Firefox (3.6.12) and Drupal SEVEN RC-2

W.M.’s picture

Continues from my last post:

The same applies to the 6.x dev branch. Modify the js file and make similar changes to the respective rtl.css file as outlined above.

Enjoy it!

shlomoweb1’s picture

Issue tags: +RTL, +hebrew, +arabic

I understand the logic, but it going to cause me a problem because i have multi-lingual sites, that need rtl and ltr support for administrators!

alayham’s picture

Same issue in 7.x-3.x-dev (Jan 30) in Chrome and Firefox on windows.

Khai Heller’s picture

FileSize
104.2 KB

Please use the attachment on the next post (#13) do not use this one. TKS

Khai Heller’s picture

FileSize
104.19 KB

Hello,
Revised admin_menu_init(), admin_menu.js and admin_menu-rtl.css.
Tested on Google chrome & Opera. Works for me.
You are welcome to give it a try.

alayham’s picture

tested the update in Chrome 10, IE9, and Firefox 4. Drop down menu works finally, but we have some minor issues with second-level sub-menus jumping to the right sometimes, on all tested browsers.

please commit this update.

thanks.

Faissl’s picture

works for me for all levels of submenus!
can't this fix be implanted in the next version?

ronyN’s picture

solved it with css:
#admin-menu-wrapper { overflow: visible; }

* for 7.x-3.0-rc1 version

sun’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev

#1297862: No dropdown menus in RTL language has been marked as duplicate of this issue. Seems to contain #16 as patch.

tsi’s picture

The fix by ronyN should get commited, I have added the fix to my theme but this is really not the way to do it.
This is only a one-liner but I'll provide a patch if that would help.

BTW Marked #713982: Css property overflow hidden for div will cause admin menu to not show in such themes as a dup

akhayyat’s picture

Ths fix:

#admin-menu-wrapper { overflow: visible; }

is not enough for version 7.x-3.0-rc3.

It allows the dropdown menus to show, but sub-menus appear on top of parent menus.

Ehud’s picture

Here is a fix that worked for me. You can add it to one of your theme's css files:

#admin-menu-wrapper { overflow: visible; }
#admin-menu li li.expandable ul {
margin: -20px 160px 0 0 !important;
}
#admin-menu li {
float: right !important;
}
/*You need  to adjust the relative path from the theme to the admin  module here*/
#admin-menu .dropdown li li.expandable {
background: #45454A url(../../../../modules/contrib/admin_menu/images/arrow-rtl.png) no-repeat 5px 7px;
}
razooloo’s picture

Issue tags: +Admin Menu

work for me
very cool thanks
i add it to admin_menu.css

navid.kashani’s picture

Component: Code » CSS / Browser Support
Status: Active » Needs review
FileSize
3.76 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

i rewrite rtl style for admin_menu 7.x-3.x, it works perfectly

yogaf’s picture

#22 works fine. thanks

navid.kashani’s picture

FileSize
3.81 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

update patch -> Cleanup & Fix bug in InternetExplorer7

Tested in:
- Firefox
- Chrome
- IE 7,8,9

just one remains problem (edit shortcuts link) that is related to the Drupal core

aflijja’s picture

i applied the patch #24 and i added in my theme css-rtl :
#edit-shortcuts {
margin-top: 30px;
}

(edit shortcuts link) is ok now.

Tested in (win xp):
- Firefox 13
- Chrome
- opera
- IE 8

akhayyat’s picture

Are these fixes for 7.x-3.0-rc3 going to be committed/released any time soon?

navid.kashani’s picture

tsi’s picture

#24 tested on chrome/FF on ubuntu, works fine for me

caspercash’s picture

#24 works for me too! Great! Now its working fine. We can finally use the admin_menu module. Thanks for this great module! Many thanks for the patch!

sun’s picture

Issue tags: -hebrew, -Admin Menu, -arabic
FileSize
4.74 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

I'm sorry for leaving this bug unattended for so long.

I've committed a first pass to bring admin_menu-rtl.css in line with the recent .dropdown changes.

Getting the full menu to work in RTL is a bit more tricky though. That is, because the JavaScript hard-codes left CSS changes, and my attempts to change the JS to conditionally/dynamically use either left or right depending on context.rtl blatantly failed.

Without that conditional JS, we'd have to change the JS to set a class instead - as in attached patch. However, that has the problem that the class' styles do not override the :hover styles in the same way the style attribute on the dropdown lists does. Consequently, the delayed mouseout behavior is broken.

Ideally, we'd make the conditional .css() property name work. But a variable cannot be used for that. Need to check whether there are any JS tricks to work around that.

alayham’s picture

last patch #30 works on a site with RTL theme, although I am still building the site structure in English.

tsi’s picture

Status: Needs review » Reviewed & tested by the community

Commented about the previous patch (#24 which worked fine), the last one (#30) fixed the issue as well, tested with the dev branch.
Plus, it seems smarter to .addClass() then to hardcode .css(), so patch is RTBC IMO

hejazee’s picture

FileSize
6.45 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

#30 works, but has some minimal issues.
I've fixed these issues and created a new patch file which works well.
Please port this patch instead of #30

  • Removed extra borders in the admin menu rtl
  • Added admin_menu_toolbar-rtl.css
  • Corrected the position of the search box
  • Corrected the position of "Edit shortcuts" link
  • Some other fixes
hejazee’s picture

Status: Reviewed & tested by the community » Patch (to be ported)
FileSize
6.5 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

Corrected the position of the search results div

odizle’s picture

#34 patch seems to be working for me. Thanks.

alayham’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

#34 worked well for me in 2 projects. I think this is ready to be committed.

layalk’s picture

#34 worked perfectly!

abn’s picture

#34: admin_menu-fix_rtl-725840-34.patch queued for re-testing.

alayham’s picture

patch<admin_menu-fix_rtl-725840-34.patch
patching file admin_menu-rtl.css
patching file admin_menu.css
Hunk #1 succeeded at 127 (offset 2 lines).
Hunk #2 succeeded at 141 (offset 2 lines).
Hunk #3 succeeded at 158 (offset 2 lines).
Hunk #4 succeeded at 176 (offset 2 lines).
patching file admin_menu.js
patching file admin_menu_toolbar-rtl.css

Patch works, admin menu dropdown works, no visible side effects so far.

talavishay’s picture

#34 worked perfectly!

hejazee’s picture

Hey, The maintainer of this module won't commit this patch (#34) after 7 months?

tsi’s picture

Priority: Normal » Major
FileSize
53.8 KB

I'm getting tired of applying this patch, here's a patched version of 7.x-3.x

Pere Orga’s picture

Priority: Major » Critical

IMHO This is critical

bloggz’s picture

FileSize
4.06 KB

I've just edited "admin_menu.js" and it works well! :D

alayham’s picture

To get the module patched by drush, add the following to your .make file:

projects[admin_menu][version]		= "3.x-dev"
projects[admin_menu][patch][]		= "http://drupal.org/files/admin_menu-fix_rtl-725840-34.patch"
zvischutz’s picture

Version: 7.x-3.x-dev » 7.x-3.0-rc4
FileSize
1020 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch patch_for_hebrew_admin_menu.patch. Unable to apply patch. See the log in the details link for more information. View

I encountered the same error on rc4 version .
Find out that by changing left to right when opening dropdowns it solves the problem for rtl language and it also works on ltr languages.
I attached here a patch file for those who want to use it.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, patch_for_hebrew_admin_menu.patch, failed testing.

hejazee’s picture

Version: 7.x-3.0-rc4 » 7.x-3.x-dev
Status: Needs work » Reviewed & tested by the community

@zvischutz, This issue has been already solved. But the maintainer of this module hasn't committed the latest working patch.
Please see https://drupal.org/comment/reply/725840#comment-6641512
#34 works perfect.

This issue is for latest dev version of this module.

zvischutz’s picture

@hejazee , Thanks .
I was not aware that all patches are tested here automatically ...
Just published it , if someone wants to continue to work in rc4 version (last official stable version) but still wants this one corrected.
I am new in patch issues , Sorry.

z.stolar’s picture

Popping this issue up in the admin|_menu issue queue.
Patch in #34 is ready to be committed and it's function was tested by enough people here.
In the RTL countries we say: "Yalla imshi"

alayham’s picture

tested the patch in #34 again with the recent updates to the dev branch.

patching file admin_menu-rtl.css
patching file admin_menu.css
Hunk #1 succeeded at 127 (offset 2 lines).
Hunk #2 succeeded at 141 (offset 2 lines).
Hunk #3 succeeded at 158 (offset 2 lines).
Hunk #4 succeeded at 176 (offset 2 lines).
patching file admin_menu.js
patching file admin_menu_toolbar-rtl.css

Works perfectly. Must be committed asap.

Mehrdad201’s picture

Patch #22 works well. Thank a lot Navid.

heidarzadeh’s picture

Issue summary: View changes

Is this patch committed?
Don't you want to commit it !!!!????

peyman_6000’s picture

not working
patch

hejazee’s picture

@peyman_6000 You should use #725840-34: No dropdown menus in RTL language. It works well.
There is no problem with it.
I'm wondering why the maintainer of the module does not apply it for next release !

sinasalek’s picture

Just tried patch on comment #34 , applied cleanly and seems to be working fine

RoySegall’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
4.29 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

Re rolling.

sinasalek’s picture

Status: Needs review » Reviewed & tested by the community

#57 applied cleanly against latest dev snapshot.
Making this RTBC

RoySegall’s picture

Can we role this one in before we need to re role it again?

samaphp’s picture

Here is very simple solution .. just edit this file: admin_menu-rtl.css
Line #45

-- right: -999em;
++ right: auto;

Or in a simple way, put this line in any -rtl.css file:
#admin-menu .dropdown li ul{right: auto;}

Enjoy RTL.

samaphp’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
297 bytes
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

Kindly Review this patch .. it's very simple .. there is no need for manylines to resolve this issue .. only oneline need to be changed to resolve this issue.

drpl’s picture

patch #62 works fine for me, Thanks

W.M.’s picture

patch at #62 fails.

It shows first level children but bot second level ones. The latter appear above current column and they disappear upon hovering over them

3ssom’s picture

patch #62

works like charm even in second levels ,,

Thank you

W.M.’s picture

In fact patch listed under #62 solves the issue completely. However, Admin Menu Toolbar still shows issues on RTL sites.

Dave Reid’s picture

Can someone confirm if this is still an issue with the latest 7.x-3.0-rc5 release?

W.M.’s picture

@Dave Reid

I have applied the patch at #62 to 7.x-3.0-rc5 release. It solved the problem but not under Admin Menu Toolbar.

doxigo’s picture

and four years later, still I need to apply a patch every time to get this fixed, can anybody please commit a patch to a version?

alayham’s picture

Somebody should close this bug as "won't fix":)

Primarily because of this bug (and for other reasons as well), I dropped this module from my make file. I use navbar

If you are still struggling with admin_menu RTL issues, give navbar a try. It is mobile friendly and works well on RTL and LTR pages.

Dave Reid’s picture

Status: Needs review » Needs work

@alayham: That is unhelpful and unproductive, so stop. Navbar is quite well known and doesn't help to resolve this issue for anyone who can't just up and switch modules (let alone entirely different navigation concepts).

As per #68 this needs a fix for the "Admin Menu Toolbar" styling as well before this can be committed.

alayham’s picture

All these 7.0 and 8.0 rtl patches need to be committed once and for all, even if only 99% perfect, they are all interdependent and every time one of them gets outdated because another css patch got committed, all or many of them go back to needs work.
RTL support in D7 is becoming a real PITA to achieve.

source: #1166886: [Policy, no patch] Improve RTL support

alayham’s picture

Status: Needs work » Reviewed & tested by the community

I tested this patch on the dev snapshot. The patch works and solves the problem.

Patch for "Admin Menu Toolbar" will come later if somebody needs it.

Please be helpful and commit this patch asap. (Remember #72 above)

samaphp’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
502 bytes
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

For those who use Admin Menu Toolbar .. here is a new patch to fix the both issues.
So, this patch is should fix the dropdown menu in RTL for everyone who use the (Admin menu toolbar) or not.
@W.M. please be gentle before you write your review and explain why it's not work with you so we can help.

Anyway this patch include the previous patch #62 .. so please be kind and test it and merge this fix please :(

alayham’s picture

Status: Needs review » Reviewed & tested by the community

I tested this patch on the dev snapshot. The patch works and solves the problem.

I also tested the patch with admin_menu_toolbar, and It works well,

Please be helpful and commit this patch asap. (Remember #72 above)

samaphp’s picture

@alayham Thanks for review .. your time is really apreciated <3
Waiting now to merge this patch ..

Benia’s picture

Indeed, I hope the patch for the Direction:RTL induced problem would go into the module as soon as possible...

pegahmajma’s picture

Thank you @Samaphp it's work fine for me. #74

3ssom’s picture

Tested patch #74 .. works good

hope its goes into the module soon ..

Thanx @Samaphp

drpl’s picture

Hello,

the #74 working fine,

Regards,

hejazee’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.21 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

#74 looks good, but has a minimal issue (extra borders are visible in admin menu toolbar)
I've fixed this problem and this is the final patch.

hejazee’s picture

FileSize
1.21 KB
PASSED: [[SimpleTest]]: [MySQL] 228 pass(es). View

Fixed a small typo (misspelled)

hejazee’s picture

Status: Needs review » Reviewed & tested by the community

Hiding files. set status back.

Dave Reid’s picture

Status: Reviewed & tested by the community » Needs review

Since your patch contained changes, please don't RTBC it yourself. Would be good to get confirmation from others that it works and fixes the additional borders.

samaphp’s picture

@hejazee I think no need for so many changes ..
#74 is just only (502 bytes)
Another thing you just copy what I did then you added an enhancement not fix, so no need enhancement for this in my opinion.

Thanks for your time but I still see the #74 is the best.

Kindly @dave commit these change since we still do this change by hand in every Drupal install :(

hejazee’s picture

FileSize
17.13 KB
2.31 KB

I've attached the images.

This is the result of #74
extra borders are visible

As you can see, extra borders are visible.

And this is the result of #82
No extra borders

You can see that #82 doesn't have that problem.

@samaphp, here is a community and all of us work and try to enhance the software.
It doesn't matter who does which part of the job.
after all, all of the participants are listed in the commit log in git.

So I believe we should do the best job.
When you post a patch, it may fix the problem, but cause a new problem. (in this case, you fixed the drop down, but extra borders appeared)
But #82 is a better patch since it doesn't expose extra borders. (doesn't produce additional problem)

So you can decide which one you choose.

Thanks all.

alayham’s picture

Status: Needs review » Reviewed & tested by the community

@Hejazee: Your patch solves another problem, not the RTL problem of this case. Please correct me if I am wrong.

I tested #74, and it is the perfect solution for this issue. Other bugs can be reported and solved separately, although they certainly need this patch to be pushed. Therefore, I am changing the status to RTBC for #74 as many of us tested it and it works and solves the problem.

There might be lots of other issues in the RTL admin_menu, In fact, this module was not properly tested because the maintainers ignored fully working patches over in the past years (I wonder why!). and unless the maintainer follows the policy for RTL CSS in D7 (see #72), this bug will take more of our time, and more patches will be submitted to address all other problems in this module's RTL CSS code.

hejazee’s picture

It doesn't matter how we solve the problem
I can create a separate issue for "extra borders"
but "extra borders" are directly related to this issue. (it's exposed after applying #74. not before that)

Then we have to wait for this issue to be committed. and then open another issue with another patch and wait for it to be committed.
this may take so much time (as you know a couple of months maybe !!)

------------
but my logic is that if you write a patch and that patch exposes a new problem. and if you can write the patch some other way that it does not expose the problem, it would be much better.

Anyway which of the following do you prefer?:

1 - wait for this issue to be committed. then wait for another issue to be committed. (or you have to apply two separate patches)

2 - apply #82 which works seamlessly and you are good to go.

When you apply #82, you see that the drop-down is fully working with no problems.

---------------
I will apply #82 on all of my sites, because it fixes the problem the best and quickest way. and does not expose a new bug.

but if you're so strict and you want to post two separate issues only for a single line of code, nobody will prevent you.

The maintainer of the module can decide witch patch to apply.

regards.

alayham’s picture

@hejazee

I said what I prefer in #70, this issue should be closed as "won't fix" and the maintainer should say clearly admin_menu does not have RTL support, so somebody can create an admin_menu_rtl module.

Besides, my dear, No, the issue is not caused by #74, the issue was invisible until the menu worked after applying #74. I still believe this is a separate bug in the code, and there might be lots of other bugs that won't be found until #74 is pushed.

The real problem here is that the maintainer has been ignoring all the patches submitted and tested during the past 4+ years. The first tested patch was submitted in Dec 15, 2010. You submitted your first patch to this bug in Oct 2012. since then, we have been struggling with the maintainer to commit the patch. Every time the maintainer changed the code, you or somebody else produced an updated patch. This process is not compatible with the RTL CSS policy that I quoted in #72. This is pretty obvious to me, but not to admin_menu maintainer.

drpl’s picture

Hello,

I tested #74 in every site I have, and it's working fine.
so please add it in module so save more step during install sites
Regards

alayham’s picture

This tool can be helpful in converting the entire css file into rtl.

http://cssjanus.commoner.com/

Credit to @LewisNyman for adding a comment about it in #1166886: [Policy, no patch] Improve RTL support

Ardethian’s picture

#74 works like a charm. Please update the module to include it.

3ssom’s picture

every time I install new drupal I have to apply path #74 .. please add it to the module so we save time

Thank you

zhilevan’s picture

patch #74 resolve my problem, apply it in version

samaphp’s picture

This is need to be applied need to be commit in a new release ..
It's so important :(

I've tried to contact Dave Reid by contact form here in drupal.org but there is no response :(
If you guys know anyone please contact with him so we can do our work faster, instead of apply this patch in everytime while we do new Drupal install.

  • Dave Reid committed 4a5fcf1 on 7.x-3.x
    Issue #725840 by hejazee, samaphp, navid.kashani, Khai Heller, W.M., tsi...

  • Dave Reid committed bafa508 on 8.x-3.x
    Issue #725840 by hejazee, samaphp, navid.kashani, Khai Heller, W.M., tsi...
Dave Reid’s picture

Status: Reviewed & tested by the community » Fixed

I've committed #74 to 7.x-3.x and 8.x-3.x and am reviewing the rest of the issue queue for things that can be fixed before creating a new release.

Dave Reid’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Priority: Critical » Major
Status: Fixed » Patch (to be ported)

Needs a patch for 6.x-3.x I believe.

hejazee’s picture

Thanks @Dave Reid, please also see this related issue: #2431015: extra borders are visible in admin menu toolbar Assigned to: hejazee

W.M.’s picture

@Dave Reid [7.x] The patch works well, please consider releasing a new full release of Admin Menu, since every time I install it using Drush I find my way again to this post to read that I should had downloaded the development version, little bit annoying :-) Thank you.

3ssom’s picture

Hello W.M,

I couldn't agree more .. everytime I use Drush I'd have to apply the patch all over again or use the dev. version.

which is really annoying.

Thanx

amagdy’s picture

For the love of god, can some one add any of the working patch to the next 7.x release ?

I have been patching it myself every time i install the module for years now

W.M.’s picture

True.. Meanwhile, You can just make a github branch and use it on every new site..