pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
307 stars 448 forks source link

Fatal error due to missing function Submission::setCoverImage in OMP #9811

Open asmecher opened 8 months ago

asmecher commented 8 months ago

Describe the bug

From https://forum.pkp.sfu.ca/t/cover-image-max-width-and-height/86955:

When trying to change the max width and height in OMP3.3.0.17 I get an error message, " An unexpected error has occurred. Please reload the page and try again." I see that there was a previous topic on this, but changing it in the db itself does not fix the problem.

What application are you using? OMP version 3.3.0-17

Additional information

Searching the code for setCoverImage, there is no function by this name, and it is only called in OMP's classes/services/ContextService.inc.php class. Probably the code was partially modernized away from getters on the submission object, but this call was missed.

touhidurabir commented 7 months ago

@asmecher PR to review omp --> https://github.com/pkp/omp/pull/1546

I am unable to reproduce the issue in local dev with latest checkout of stable-3.3.0 and also in test drive from Website > Appearance > Advanced . However I can see that there is not such method as Submission:: setCoverImage and it should be removed . Also code should never reach to that place as for submissions, the cover image manipulation done before .

asmecher commented 7 months ago

I think this might be compounded by bad data that wasn't migrated from submission_settings to publication_settings. I've followed up on the forum to confirm with the original reporter: https://forum.pkp.sfu.ca/t/cover-image-max-width-and-height/86955/8