Jump to content
modifiedcontent

Site stuck on FileCompiler "cache" + Fatal Error: Class 'ProcessWire' not found

Recommended Posts

I had upgraded my Apache configuration to include PHP7.2 and PHP7.3 for a Laravel-based script on the same server. Somehow it/I messed up a previously fine Processwire site, in a very confusing way.

The site still looks fine, but editing template files has no effect whatsoever. It is stuck on some kind of cached version. I have already disabled PHP7's OPcache, cleared browser caches, etc, with no effect.

The pages now apparently come from PW's assets/cache/FileCompiler folder, even though I never enabled template caching for this site.

I have tried adding "namespace ProcessWire;" to the top of the homepage template file, but then I get this fatal error:

Quote

Fatal Error: Uncaught Error: Class 'ProcessWire' not found in /home/myaccount/public_html/mywebsite/site/templates/process/functions.php:7
Stack trace:
#0 /home/myaccount/public_html/mywebsite/site/templates/inc/head.php(1): include()
#1 /home/myaccount/public_html/mywebsite/site/templates/home.php(11): include('/home/bizpartn/...')
#2 /home/myaccount/public_html/mywebsite/wire/core/TemplateFile.php(287): require('/home/bizpartn/...')
#3 /home/myaccount/public_html/mywebsite/wire/core/Wire.php(380): ProcessWire\TemplateFile->___render()
#4 /home/myaccount/public_html/mywebsite/wire/core/WireHooks.php(733): ProcessWire\Wire->_callMethod('___render', Array)
#5 /home/myaccount/public_html/mywebsite/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array)
#6 /home/myaccount/public_html/mywebsite/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array)
#7 /home/myaccount/public_html/mywebsite/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage(Object(Pr (line 7 of /home/myaccount/public_html/mywebsite/site/templates/process/functions.php)

This error message was shown because: you are logged in as a Superuser. Error has been logged.

My functions.php file pulls data in from another Processwire installation on the same VPS with the following line:

$othersitedata = new ProcessWire('/home/myaccount/public_html/myothersite/site/', 'https://myothersite.com/');

That apparently still works fine; the site still displays data from the other installation, but via the "cached" template that I am now unable to change.

 

I don't know where to start with this mess. Does any of this sound familiar to anyone? Any pointers in the right direction would be much appreciated. 

 

Edit:

Adding "$config->templateCompile = false;" to config.php results in the same fatal error as above. 

Share this post


Link to post
Share on other sites

Answering my own question:

I got directory/files ownership/permission screwed up on /site/assets/cache. Or PHP7.3 handles those differently?

/cache and /modules should be writable. I had both on 755, but guess ownership was wrong.

Doing this via ssh fixed it:

chown -R myserveruser site/assets/cache

chown -R myserveruser site/modules

chmod -R a+w site/assets/cache

chmod -R a+w site/modules

 

Are there other folders/files I should double-check?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By jds43
      Hello,
      Does anyone have experience with migrating content from Django to Processwire? Or are there any suggestions for achieving this?
    • By Mithlesh
      Hi there, 

      How to add Google Recaptcha V 3.0 in the processwire?

      My website has this module: Markup Google reCAPTCHA but I am not sure whether that is V.3 or any other, sharing the SS below:


      Let me know how to update or integrate the same

      Thanks
    • By Varun
      Hi, How to change favicon in Seavuel theme which we have purchased from https://codecanyon.net/item/seavuel-multilingual-hotel-website-with-cms-bootstrap-theme/19316343
    • By MacLeod
      [GERMAN]
      Hallo Community,
      ich hoffe Ihr könnte mir weiter helfen?
      Ich habe Processwire bei meinen Webhosting Anbieter installiert ohne Probleme.
      Nun wollte ich es bei meinen Local webserver (MAMP 4.1) installieren...
      Leider zeigt er mir einen Datenbank fehler, dass er bestimmte Tabelle nicht finden kann!!!
      (Siehe Bild)
      Kann mir einer sagen, wodurch der Fehler verursacht wirt?
      Habe es auch schon bei einen Kumpel und eine anderen Local Webserver Umgebung Installiert. Immer der Selbe Fehler.
      Gruß
      MacLeod
       
      [ENGLISH]
      Hello Community,
      I hope you could help me further?
      I have Processwire installed at my webhosting provider without any problems.
      Now I wanted to install it on my local webserver (MAMP 4.1) ...
      Unfortunately he shows me a database error that he can not find certain table !!!
      (See image)
      Can someone tell me what causes the error?
      Have it already installed with a buddy and another Local Web server environment. Always the same mistake.
      greeting
      MacLeod
       

×
×
  • Create New...