PHP Fatal Error when trying to search user in add reviewer, Enroll an Existing User as Reviewer

Describe the issue or problem
When inserting name in the search bar for Enroll an Existing User as Reviewer, php fatal error occurred and no result is display. only spinning wheel.

Steps I took leading up to the issue

  1. Add reviewer
  2. Enroll an Existing User as Reviewer
  3. Search Name

What application are you using?
OJS 3.4.0.5, PHP 8.2, MariaDB 10.5

Additional information

Blockquote
AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘u.user_id’ in ‘where clause’ in /home/xxxxxxx/public_html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414\nStack trace:
n#0/home/xxxxxxx/public_html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): PDO->prepare(‘select u.* fr…’)
n#1/home/xxxxxxx/public_html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}(‘select u.* fr…’, Array)
n#2/home/xxxxxxx/public_html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback(‘select u.* fr…’, Array, Object(Closure))
n#3/home/xxxxxxx/public_html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\Database\Connection->run(‘select u.* fr…’…’, referer:

other system function is working.

1 Like

Hi @mohd_arshad,

I’ve confirmed the issue and filed it for attention here:

Please watch the issue for an update.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

This topic was automatically closed after 5 days. New replies are no longer allowed.

Hi @mohd_arshad,

Would it be possible for you to execute this SQL query in your MariaDB:


select u.* from users as u 
where u.disabled = 0 and exists (
select * from user_user_groups as uug 
inner join user_groups as ug on uug.user_group_id = ug.user_group_id 
where uug.user_id = u.user_id and ug.context_id in (1) and u.user_id not in (
select uug.user_id from user_user_groups as uug 
inner join user_groups as ug on uug.user_group_id = ug.user_group_id where uug.user_id = u.user_id and ug.context_id in (1) and ug.role_id in (4096)
)
) 
order by u.user_id asc;

To double check if this would lead to an error in MariaDB…

Please note that journal ID in the SQL = 1 i.e. context_id in (1), so that this number maybe need to be adjusted…

Thanks a lot!
Bozana

Thank you for the reply. Im on eid holliday now. Will reply on Tuesday.

Hi @mohd_arshad, I asked a colleague and he could test it. It seems it works, so I will prepare a fix in that GitHub issue above…

hi @bozana i apply this fix in my sandbox ojs and the search is now working,

is it just this one or any other line that i need to change?

Hi @mohd_arshad

Oh, please wait just a little bit more – we found a better SQL and I will change the PR today, Once it is reviewed and merged I will let you know to apply the fix… OK?

Thanks a lot!
Bozana

Ok i will wait after its been reviewed. TQVM.