Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In the 'edit' screen for homebox pages, the translated names are (displayed and) stored in the settings['roles'] property.
This means _homebox_user_access_view_homebox() (which compares against the untranslated names) will always return false.
Patch attached. Please test the update function (I did, but not fully).
Comment | File | Size | Author |
---|---|---|---|
#13 | homebox-fix-role-access-1467140-13.patch | 536 bytes | jsacksick |
#8 | homebox-role-access-error-1467140.patch | 1006 bytes | Tomefa |
homebox-rolepermissions.patch | 3.83 KB | roderik | |
Comments
Comment #1
mguillermin CreditAttribution: mguillermin commentedI had the same issue on a French website.
Your patch worked fine for me (though I didn't test the "database update" part as I didn't need it).
Comment #2
flocondetoileI had the same issue on a french site.
I have to apply the patch manually on the section about the file homebox.module. Problems with the section that no matches the lines of the module (i checked it and seems to be OK, but i don't know the syntax of the batch git).
Otherwise, your patch works fine. All is now OK and users can access to their homebox tab in their profil.
This works without update the database.
I execute the script to update the database, and the update works fine too.
Thanks.
Comment #3
chrbak CreditAttribution: chrbak commentedI tried to commit the patch but after running the update my current homebox pages were having problems.
At the administrator page of Homebox the names of my homebox pages converted to the letter 'a'... and when i went to the edit page of one of them the data weren't loaded at all.
Therefore i tried the below change of code and worked fine for me. Instead of (at line 1572) :
The code :
Comment #4
mgiffordThis is instead of this fragment?
Comment #5
roderikLooks like it, yes. The full change in that fragment is not really necessary, it was just some optimization.
I have a hunch that you can also just replace
array_search($role, $user->roles)
byarray_search($role, $user->roles, TRUE)
.Comment #6
mgiffordOk, so what then needs to be done before this patch (which is nearly 2 years old) marked RTBC? From #3 it seems like a new patch is in order.
Comment #7
Tomefa CreditAttribution: Tomefa commentedSee next comment
Comment #8
Tomefa CreditAttribution: Tomefa commentedHere is the working patch file made with the #3 comment information.
It's working for me now.
Needs review on this patch and add it to the next release of Homebox.
It's really important for all the multi-language website.
ThanksHere is the working patch file made with the #3 comment information.
It's working for me now.
Needs review on this patch and add it to the next release of Homebox.
It's really important for all the multi-language website.
Thanks
Comment #9
Tomefa CreditAttribution: Tomefa commentedComment #10
Tomefa CreditAttribution: Tomefa commentedComment #11
Tomefa CreditAttribution: Tomefa commentedComment #12
mgiffordI just tested it here in a bilingual environment http://sc0b30340f99fad8.s3.simplytest.me/fr/testbox
Seemed to work.
Comment #13
jsacksick CreditAttribution: jsacksick commentedPatch rerolled against dev.
Comment #14
drummThanks, committed!