3.5.0.2 - not loading search in "Add Reviewer"

Hi @asmecher

We recently upgraded our OJS installation to 3.5.0.2.
Everything works fine except for the Add reviewer form. The search bar is not working properly and is even unable to search the reviwers. The Filer option alos not showing any result. means loads and performs searches, not at all.

No error found in the error log. But OJS 3.5.0.1 is working fine on the same database. What’s the solution?

Hi @Rohaan123,

It sounds like you’ve already checked the PHP error log, which is where I would expect to find something. If you’re sure there’s nothing there, can you also check your browser’s error console when trying to search to see if something appears there?

Regards,
Alec Smecher
Public Knowledge Project Team

Indeed, there is something like that. We initially experimented with ChatGPT but switched to a code that addressed the typing issue. However, after searching for it, we found no results. Furthermore, there are over 400 reviews stored in the database. It is functioning correctly in OJS 3.5.0.1 with the same database. However, there are other errors, such as email problems with OJS 3.5.0.1.

TypeError: this.items.filter is not a function or its return value is not iterable
at Proxy.currentReviewers (build.js?v=3.5.0.2:3:130)
at vme (build.js?v=3.5.0.2:1:9181)
at get value (build.js?v=3.5.0.2:1:21188)
at Object.get [as currentReviewers] (build.js?v=3.5.0.2:1:52005)
at build.js?v=3.5.0.2:13:2493
at Nn (build.js?v=3.5.0.2:1:48284)
at Proxy.tct (build.js?v=3.5.0.2:13:1258)
at yB (build.js?v=3.5.0.2:1:74312)
at fw.Bt [as fn] (build.js?v=3.5.0.2:1:64722)
at fw.run (build.js?v=3.5.0.2:1:7744)
M8e @ build.js?v=3.5.0.2:1
n5 @ build.js?v=3.5.0.2:1
yB @ build.js?v=3.5.0.2:1
Bt @ build.js?v=3.5.0.2:1
run @ build.js?v=3.5.0.2:1
Ue @ build.js?v=3.5.0.2:1
Be @ build.js?v=3.5.0.2:1
M @ build.js?v=3.5.0.2:1
me @ build.js?v=3.5.0.2:1
ge @ build.js?v=3.5.0.2:1
ee @ build.js?v=3.5.0.2:1
M @ build.js?v=3.5.0.2:1
Bt @ build.js?v=3.5.0.2:1
run @ build.js?v=3.5.0.2:1
runIfDirty @ build.js?v=3.5.0.2:1
t5 @ build.js?v=3.5.0.2:1
Wme @ build.js?v=3.5.0.2:1
Promise.then
Ume @ build.js?v=3.5.0.2:1
aJ @ build.js?v=3.5.0.2:1
(anonymous) @ build.js?v=3.5.0.2:1
trigger @ build.js?v=3.5.0.2:1
KX @ build.js?v=3.5.0.2:1
_b @ build.js?v=3.5.0.2:1
set @ build.js?v=3.5.0.2:1
set @ build.js?v=3.5.0.2:13
t5 @ build.js?v=3.5.0.2:1
Rh @ build.js?v=3.5.0.2:1
dwe @ build.js?v=3.5.0.2:1
setItems @ build.js?v=3.5.0.2:13
success @ build.js?v=3.5.0.2:1
c @ jquery.min.js?v=3.5.0.2:2
fireWith @ jquery.min.js?v=3.5.0.2:2
l @ jquery.min.js?v=3.5.0.2:2
(anonymous) @ jquery.min.js?v=3.5.0.2:2
XMLHttpRequest.send
send @ jquery.min.js?v=3.5.0.2:2
ajax @ jquery.min.js?v=3.5.0.2:2
get @ build.js?v=3.5.0.2:1
(anonymous) @ build.js?v=3.5.0.2:1
Promise.then
Ta @ build.js?v=3.5.0.2:1
searchPhrase @ build.js?v=3.5.0.2:1
t5 @ build.js?v=3.5.0.2:1
Rh @ build.js?v=3.5.0.2:1
(anonymous) @ build.js?v=3.5.0.2:1
U @ build.js?v=3.5.0.2:1
t5 @ build.js?v=3.5.0.2:1
Wme @ build.js?v=3.5.0.2:1
Promise.then
Ume @ build.js?v=3.5.0.2:1
aJ @ build.js?v=3.5.0.2:1
(anonymous) @ build.js?v=3.5.0.2:1
(anonymous) @ build.js?v=3.5.0.2:1
trigger @ build.js?v=3.5.0.2:1
KX @ build.js?v=3.5.0.2:1
_b @ build.js?v=3.5.0.2:1
set @ build.js?v=3.5.0.2:1
set @ build.js?v=3.5.0.2:1
setSearchPhrase @ build.js?v=3.5.0.2:1
t5 @ build.js?v=3.5.0.2:1
Rh @ build.js?v=3.5.0.2:1
dwe @ build.js?v=3.5.0.2:1
(anonymous) @ build.js?v=3.5.0.2:1
b @ build.js?v=3.5.0.2:1
setTimeout
_ @ build.js?v=3.5.0.2:1
OGe.H.onKeyup.t..t. @ build.js?v=3.5.0.2:1
t5 @ build.js?v=3.5.0.2:1
Rh @ build.js?v=3.5.0.2:1
n @ build.js?v=3.5.0.2:1Understand this error

Hi @Rohaan123,

Thanks for the details. Unfortunately I can confirm the behaviour here too – the regression was added to the 3.5.0-2 release very late in the dev cycle and made it through our checks. I’ve filed the issue (and proposed at least a partial fix that should get you un-stuck) here:

https://github.com/pkp/pkp-lib/issues/12100#issuecomment-3614365262

Regards,
Alec Smecher
Public Knowledge Project Team

I tried adding the file and changing the code, by the issue is still the same. But when the index.php file from api/vi/user the its gives an error “The requested URL was not recognized.“

api/v1/users/reviewers 404 (Not Found), even the files or folders are not found.

I also attempted to replace this code in the build.js file, which resolves the typing issue in the search bar. However, it does not yield any results.

computed:{currentReviewers(){return Object.keys(this.activeFilters).length?this.items:[…this.lastRoundReviewers,…this.items.filter(e=>!this.lastRoundReviewerIds.includes(e.id))]},lastRoundReviewerIds(){return this.lastRoundReviewers.map(e=>e.id)}},watch:{activeFilters(e,t){this.offset=0,e&&Object.keys(e).length&&(this.isSidebarVisible=!0)}}

@asmecher The file path is:
lib>pkp>api>v1>users>PKPUserController.php

Line no. 256

‘items’ => $items,
changed to
‘items’ => array_values($items),

Search is working now

But found another issue that it’s not showing the reviwers’ interest.

I found another issue that it does not show the reviewers’ interest, and it also does not yield the complete research. It means it just shows the maximum 20 reviewers’ data only, and there is no option to go to other pages, as in OJS 3.4.

Hi @Rohaan123,

Stay tuned for a more complete solution at the link above.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Great

Despite implementing these modifications, the pagination issue persists, and the reviewers’ interest remains unfulfilled.

We are utilizing this functionality by eliminating these two lines, thereby obtaining the complete list of filters without pages.

->limit($params[‘count’] ?? null)

        ->offset($params\['offset'\] ?? null);

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