Missing Smarty Class and weird box characters in the source code

  • Application Version: Latest stable download 3.2.1-2
  • Description of issue: I’m trying to install a fresh instance but I’m getting this error when I try to load any page, after downloading the tar.gz from the website and uploading all the files to my server. I checked and the lib/pkp files appear to be there and there’s a lot of Smarty files, including the mentioned one, located at “lib/pkp/lib/vendor/smarty/”

Fatal error: Uncaught Error: Class ‘Smarty_Resource_Custom’ not found in /var/www/public_html/ojs/lib/pkp/classes/template/PKPTemplateResource.inc.php:16

I’m also seeing a line of boxes on the first line when I view the source, what’s that about?
Screen Shot 2021-01-25 at 8.59.52 PM

  • Steps you took leading up to the issue: I got the latest version, uploaded the files to my server, made changes in the config file, changed the recomended file permission changes, and ran composer from /lib/pkp/ just in case

  • What you tried to resolve the issue: Searched the internet and forum for additional install instructions, found very little.

  • Screenshots:
    Screen Shot 2021-01-25 at 8.47.31 PM

Is this the correct place for the vendor folder? Is there some issue with a missing autoloader? Is there some configuration step that I cant locate? I’ve never had this much trouble installing a white-box PHP application.

Please advise,
Thank you.

Hi @Jafucius,

Just unpacking the OJS .tar.gz file should be all that’s required – you don’t need to run Composer. Yes, the Smarty_Resource_Custom class should be in lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_resource_custom.php, and loading that class should be taken care of by the Composer integration (which also comes shipped with OJS and shouldn’t require anything additional).

I wonder if a file somehow got garbled during the unpacking/uploading of the contents of the .tar.gz file; I’d recommend starting fresh from the OJS .tar.gz file to make sure all files are present and correct.

Regards,
Alec Smecher
Public Knowledge Project Team