View Issue Details

IDProjectCategoryView StatusLast Update
4760Composrcore_forum_driverspublic2022-01-05 04:22
ReporterAdam Edington Assigned ToChris Graham  
PrioritynormalSeveritytrivial 
Status resolvedResolutionfixed 
Product Version10.0.39 
Fixed in Version10.0.40 
Summary4760: SU issue with "Guest" on multilingual sites
DescriptionThe member ‘Visiteur’ does not exist. Same for "Гость" etc.
TagsNo tags attached.
Attach Tags
Attached Files
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2022-01-03 20:28

administrator   ~7245

Are you implying that you expect keep_su=Visiteur to work? SU is literally just expecting a username, so the guest user would have to be named Visiteur in the database.

Chris Graham

2022-01-03 20:30

administrator   ~7246

Last edited: 2022-01-03 20:31

Actually I think you are saying you are seeing the Guest user referred to as Visiteur somewhere, so you expect this is the username and you can SU to it?
Perhaps this is a valid point. Composr is mapping the username by language pack and ignoring what is in the DB, so it is inconsistent in its handling at least.

admin

2022-01-03 23:28

administrator   ~7251

Automated response: Consistently with the written name of the Guest user

In some parts of Composr we use the 'GUEST' language string, and others we use the field value from the guest member row in the f_members table.
That is fine, but it means that we need to automatically recognise the contents of the 'GUEST' language string as guest (in whatever language is currently active) as that guest user, as well as the value from the database.

admin

2022-01-03 23:28

administrator   ~7252

Fixed in git commit 187fd5d7e (https://gitlab.com/composr-foundation/composr/commit/187fd5d7e - link will become active once code pushed to GitLab)

A hotfix (a TAR of files to upload) has been uploaded to this issue. These files are made to the latest intra-version state (i.e. may roll in earlier fixes too if made to the same files) - so only upload files newer than what you have already. If there are files in a hot-fix that you don't have then they probably relate to addons that you don't have installed and should be skipped. Always take backups of files you are replacing or keep a copy of the manual installer for your version, and only apply fixes you need. These hotfixes are not necessarily reliable or well supported. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/).

Adam Edington

2022-01-04 14:33

administrator   ~7253

Last edited: 2022-01-04 14:37

I typed Guest in the SU box and it says "Visiteur" does not exist when in French. I never tried using Visiteur or any of the other translations of Guest in the SU box as it already told me these accounts do not exist. Thanks for the fix.

Chris Graham

2022-01-05 04:22

administrator   ~7254

Ah, so actually the bug wasn't as trivial as I thought due to this code...

        if ($ks == do_lang('GUEST', null, null, null, fallback_lang())) {
            $ks = do_lang('GUEST');
        }

It maps "Guest" to the equivalent in the current user's language pack and tries to look up that in the database, which will only succeed if the Guest user in the database was initially created with the language the current user is on.

My fix does resolve the issue, as well as the issue I thought this was about.

Issue History

Date Modified Username Field Change
2022-01-03 18:03 Adam Edington New Issue
2022-01-03 20:28 Chris Graham Note Added: 0007245
2022-01-03 20:28 Chris Graham Assigned To => Chris Graham
2022-01-03 20:28 Chris Graham Status Not Assigned => Closed
2022-01-03 20:28 Chris Graham Resolution open => no change required
2022-01-03 20:29 Chris Graham Assigned To Chris Graham =>
2022-01-03 20:29 Chris Graham Status Closed => Not Assigned
2022-01-03 20:29 Chris Graham Resolution no change required => reopened
2022-01-03 20:30 Chris Graham Note Added: 0007246
2022-01-03 20:31 Chris Graham Note Edited: 0007246
2022-01-04 14:33 Adam Edington Note Added: 0007253
2022-01-04 14:36 Adam Edington Note Edited: 0007253
2022-01-04 14:37 Adam Edington Note Edited: 0007253
2022-01-05 04:22 Chris Graham Note Added: 0007254