pkp / classic

An official theme for OJS 3.1.1+
GNU General Public License v2.0
11 stars 27 forks source link

PHP 8.0 Fatal error in search.tpl #100

Closed AndrewGearhart closed 2 years ago

AndrewGearhart commented 2 years ago

Describe the bug Health Science theme has fatal error on search.tpl page when running on php 8.0 (+?)

To Reproduce Steps to reproduce the behavior:

  1. Use the health science theme
  2. Visit the search page where the search filters would be displayed.

Expected behavior Search page should load without errors.

Additional context Page throws an error: PHP Fatal error: Uncaught Error: Attempt to modify property “value” on null in /var/www/html/cache/t_compile Found this to be a similar issue: https://forum.pkp.sfu.ca/t/ojs-3-3-0-11-search-page-not-loading-in-health-sciences-theme/74391 Which was stated to be fixed with the change in this commit (on the second file, search.tpl): default theme fix - https://github.com/pkp/ojs/commit/d876fbc7d0f23caadd8108036f25f7a36218fb26 However, the circumstance that we're running into is the same as the OP, on PHP 8.0 (not PHP 8.1). Updating with the change from the default theme has been tested working with php 7.4.30 and 8.0. It is presumed that PHP 8.1 would have the same issue.

Related Issues: Health Sciences - https://github.com/pkp/healthSciences/issues/220 Immersion - https://github.com/pkp/immersion/issues/74