Jump to content

Module randomly not found


pleini
 Share

Recommended Posts

Hey guys,

i am using PW version 3.0.25 and i am hosting my site on AWS. I have encountered a problem that randomly after a deploy some modules are not available. It happens randomly, and to different modules. Clearing the FileCompiler Cache does not help in this case, after a redeployment the error is gone most of the time. 

Somebody has encountered the same problem or has any tips?

Screenshot of the error message is attached

Thanks and best regards

Joscha

module_error.png

Link to comment
Share on other sites

35 minutes ago, pleini said:

I have encountered a problem that randomly after a deploy some modules are not available. It happens randomly, and to different modules. 

Can you please be more descriptive and elaborate on the modules that are affected by this problem?  The more information you can provide about your issue the better someone will be able to help you.

Link to comment
Share on other sites

The module from the screenshot is inheriting the FieldtypeFile module and is adding some additional meta fields to the file and is hooking on file save and uploads the file to amazon s3. Another module that failed is inheriting the ProcessRedirects module. Another module is an autoload plugin that adds multiple hooks to Page::render or Page::save where we replace texts or populate fields on pages automatically. Sometimes it happens as well that the class of the inherited module is not found. So for example FieldtypeFile, ProcessRedirects, FieldtypeImage. We hadnt that problem in 2.x. Maybe its a problem with the FileCompiler?

Link to comment
Share on other sites

@pleini

Does this occur only when PW is trying to access those files? Do you have any issues accessing the files from the command line or ftp?

My first thought when I read your description is that of possible disk corruption. It doesn't sound like it's a permissions issue as the permissions on the files shouldn't be changing, nor should the user the server process is running as.

Sorry I can't be of more help!

Link to comment
Share on other sites

  • 1 month later...

@pleini I might be barking up the wrong tree, but looking at the message, it seems like it is looking for a class in the root namespace (class \FieldtypeZZFile) and I'm not sure this is correct for the file compiler, I would have expected it to be looking for a class called \Processwire\FieldtypeZZFile. Might be worth raising this as an issue in the new issues repository on github (post again if you need a link there.)

Link to comment
Share on other sites

Is opcache enabled in PHP? If it is, this could be a name collision problem. You can check by calling ini_set('opcache.enable', false) in site/config.php and see if the problem still occurs. If that helps, there are a number of configuration options to look at, most importantly opcache.use_cwd, opcache.validate_timestamps, opcache.revalidate_paths and opcache.enable_file_override, all documented here. There's an interesting article at sitepoint that lists a few tools for working with opcache if it really is the culprit.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...