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
Add reviewer
Enroll an Existing User as Reviewer
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:
opened 09:40PM - 25 Mar 24 UTC
**Describe the bug**
From: https://forum.pkp.sfu.ca/t/php-fatal-error-when-tryi… ng-to-search-user-in-add-reviewer-enroll-an-existing-user-as-reviewer/87148
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
```
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:
```
This is a regression caused by https://github.com/pkp/pkp-lib/issues/9541.
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.
bozana
April 11, 2024, 11:46am
4
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.
bozana
April 11, 2024, 6:38pm
7
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,
pkp:stable-3_4_0
← bozana:9832-3_4_0
opened 10:05AM - 12 Apr 24 UTC
s. https://github.com/pkp/pkp-lib/issues/9832
is it just this one or any other line that i need to change?
bozana
April 15, 2024, 9:34am
9
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.
bozana
April 25, 2024, 7:01am
11
Hi @bozana
I apply the fix and its working as intended.
TQVM.