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 7763 - Blank email notification sent when submission metadata is edited
Blank email notification sent when submission metadata is edited
Product: OJS
Classification: Unclassified
Component: Open Journal Systems
All All
: P3 normal
Assigned To: PKP Support
Depends on:
  Show dependency treegraph
Reported: 2012-08-08 13:34 PDT by barbara.hui
Modified: 2012-08-31 07:30 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:

Patch against OJS 2.3.7 (652 bytes, patch)
2012-08-08 18:19 PDT, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description barbara.hui 2012-08-08 13:34:43 PDT
What's happening is that when a user is signed up to get email notifications for certain actions, the emails that are sent have the subject "[journal_path] Array" and a blank body (with the journal's footer at the bottom). I posted a description to the forums here: http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=8813 -- looks like at least one other site is experiencing this.

In trying to debug, it looks like there's something going on it this file in the pkp/lib submodule:
On line 292 when the parameters should be set for various parts of the email (subject, body), the parameters are empty.
Comment 1 Alec Smecher 2012-08-08 16:18:10 PDT
Barbara, can you verify whether there's an email called "NOTIFICATION" in your Journal Manager's "Prepared Emails" interface?
Comment 2 barbara.hui 2012-08-08 16:29:05 PDT
Hi Alec,

Yes, the email template is in the UI. I've checked the database queries in the code and those seem fine. Somehow the parameters for the subject and body of the email/notification aren't being passed in properly when the notification object is created.

Comment 3 Alec Smecher 2012-08-08 16:31:05 PDT
Unfortunately I'm having trouble replicating the problem. Does it seem to affect all emailed notifications, or just one or two in particular?
Comment 4 barbara.hui 2012-08-08 16:47:04 PDT
Sorry, here's how I'm replicating the problem that users are reporting: 

-- sign into journal as author (this user has author role only)
-- click on "Notifications" in the sidebar, then "Manage"
-- check off "Send me an email for these types of notifications." under "Submission Events" --> "Title's" metadata has been modified."
-- sign in to journal as editor (this user is also has all other roles for this journal)
-- make some modifications to that submission's metadata (example URL: ojs/index.php/test-journal/editor/viewMetadata/12345)
-- click "Save Metadata" at the bottom of the page
-- upon submission, the author account gets an email with the subject "[Test] Array" and the contents:

Internal Test Journal
Comment 5 Alec Smecher 2012-08-08 18:19:22 PDT
Created attachment 3838 [details]
Patch against OJS 2.3.7

Barbara, try this patch -- it should correct the issue. It was a pretty obscure POST variable clobbering.
Comment 6 Alec Smecher 2012-08-08 18:40:03 PDT
Fixed accidental override from posted subject param in notification email
Comment 7 Alec Smecher 2012-08-08 18:40:04 PDT
Fixed accidental override from posted subject param in notification email
Comment 8 barbara.hui 2012-08-09 11:01:33 PDT
Aha! Thanks Alec. That fixes it.