We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 6440 - a few things about reviewing interests
a few things about reviewing interests
Product: OJS
Classification: Unclassified
Component: General
All All
: P3 normal
Assigned To: PKP Support
: 6237 6642 6668 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2011-02-24 06:49 PST by Bozana Bokan
Modified: 2011-06-02 08:18 PDT (History)
6 users (show)

See Also:
Version Reported In:
Also Affects:

Patch against OJS 2.3.4 (15.95 KB, patch)
2011-03-02 16:46 PST, Matthew Crider
Details | Diff
Patch against OJS 2.3.4 (20.98 KB, patch)
2011-03-09 11:19 PST, Matthew Crider
Details | Diff
Patch against OJS 2.3.4 (20.42 KB, patch)
2011-03-09 11:29 PST, Matthew Crider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bozana Bokan 2011-02-24 06:49:45 PST
Saving the UserManagementForm (Journal Management --> Enrollment --> Edit) that contains no 'Reviewing interests' leads to the following warnings in the log file:
ojs2 has produced an error\n  Message: WARNING: array_map(): Argument #2 should be an array\n  In file: /data/ojs/stable-test/classes/manager/form/UserManagementForm.inc.php\n  At line: 369\n 
ojs2 has produced an error\n  Message: WARNING: array_unique(): The argument should be an array\n  In file: /data/ojs/stable-test/lib/pkp/classes/user/InterestDAO.inc.php\n  At line: 111\n
ojs2 has produced an error\n  Message: WARNING: Invalid argument supplied for foreach()\n  In file: /data/ojs/stable-test/lib/pkp/classes/user/InterestDAO.inc.php\n  At line: 112\n 

'Reviewing interests' are actually not language specific (why not?), but in the import/export plug-in they are treated as they would be. They can not be imported at the moment. S. also this bug: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6237

Changing the form language in the UserManagementForm the 'Reviewing interests' will contain '+' signs instead of spaces (urlencoded but not urldecoded again?)

If the last reviewing interest item doesn't end with the ',' sign, it won't be saved.

Hmmm... I think that's it for now... ;-)
Comment 1 Bozana Bokan 2011-02-24 07:06:14 PST
one more strange thing, happening only after the following steps:
- Journal Management --> Enrollment --> Edit
- enter a review interest item
- change the form language
--> error log:
File does not exist: ...lib/pkp/styles/images/ui-anim_basic_16x16.gif, referer: ...lib/pkp/styles/jqueryUi.css
Comment 3 Matthew Crider 2011-03-02 16:18:26 PST
*** Bug 6237 has been marked as a duplicate of this bug. ***
Comment 4 Matthew Crider 2011-03-02 16:46:03 PST
Created attachment 3445 [details]
Patch against OJS 2.3.4

Here's a patch for OJS 2.3.4 -- Again, The Git HEAD changes won't apply cleanly to 2.3.4.
Comment 5 Alec Smecher 2011-03-02 17:06:05 PST
Matt, the registration page is broken in git head with this (didn't check the patch against OJS 2.3.4 but suspect it's similar).
Comment 6 Matthew Crider 2011-03-02 17:55:26 PST
Looks like it was broken before this was even committed.  I'm looking into it.
Comment 7 Bozana Bokan 2011-03-03 06:54:38 PST
Hi Matt,

I am not sure, what language issues you exactly mean, but... I suppose you mean #3 from my first post and maybe my second post, right? -- because you solved all the others :-)

#3 from my first post:
When doing the following:
- Journal Management --> Enrollment --> Edit
- enter a review interest item with a space (e.g. "asdf asdf,")
- change the form language (the journal should use at least two languages, at least for the forms)

Now I get '+' signs instead of spaces in the interests, i.e. "asdf+asdf" in the example above (using the ojs 2.3.4 as well as the recent git version).

And speaking about spaces:
The new description says that you can separate interests with spaces, but I think it's not true, or?

My second post:
The message "File does not exists:..." appears in the error log file when using ojs 2.3.4 -- it doesn't appear when using the recent git version. There have to exist some controlled vocab (e.g. an interest already exists). The message appears when I edit an user form ANEW (Journal Management --> Enrollment --> Edit) and type the first letter in the interests field. 

I hope this helps a little bit...
Thanks a lot!
Comment 8 Matthew Crider 2011-03-03 14:43:54 PST

Alec: The issue was with the affiliation field, and also some un-literalized javascript.  Both issues are fixed.  Do you want to take a quick look at the changeset for e.g. any xss issues, as i've changed around a bit the way we're dealing with encoding the keywords?  I'll post a combined patch if everything checks out.

Bozana: I was able to reproduce the error with the '+' symbols.  Thanks for spotting this, its been fixed.  I'm hesitant to do anything with the 'file does not exist' warning because its best not to patch the (official) jqueryUi.css file, and its been fixed already in git HEAD with the new jquery UI CSS.  The warning you get is harmless, e.g. it doesn't disrupt anything, right?
Comment 9 Bozana Bokan 2011-03-03 14:51:03 PST
Yup, yup... :-)
Comment 10 Alec Smecher 2011-03-04 15:05:59 PST
Matt, the Register page doesn't properly escape interests that have html in them (enter one and view the source -- look for the textarea contents). It's implemented differently from the user profile template; the two should be the same.

The registration page should save entered interests and present them for editing if the form can't be submitted. Try going to the "Register" page and just filling in the reviewing interests, then try submitting; the interests should be reflected back to the user.
Comment 12 Alec Smecher 2011-03-08 16:48:06 PST
Close, but escaping is still not consistently implemented in templates/sectionEditor/createReviewerForm.tpl and templates/manager/people/userProfileForm.tpl (compared with profile.tpl and register.tpl).
Comment 14 Matthew Crider 2011-03-09 11:19:21 PST
Created attachment 3456 [details]
Patch against OJS 2.3.4
Comment 15 Alec Smecher 2011-03-09 11:25:51 PST
Looks good, Matt. I filed the affiliation fix separately as bug #6484; could you can remove it from this patch, post an updated version, and commit as well to ojs-stable-2_3?
Comment 16 Matthew Crider 2011-03-09 11:29:59 PST
Created attachment 3457 [details]
Patch against OJS 2.3.4
Comment 18 Michael Felczak 2011-03-18 17:06:42 PDT
Added missing comma:
Comment 19 Michael Felczak 2011-03-18 17:48:21 PDT
Another missing comma:
Comment 20 Alec Smecher 2011-05-10 23:21:29 PDT
*** Bug 6642 has been marked as a duplicate of this bug. ***
Comment 21 Alec Smecher 2011-06-02 08:18:43 PDT
*** Bug 6668 has been marked as a duplicate of this bug. ***