pleini

Module randomly not found

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

Share this post


Link to post
Share on other sites

Are you able to update to the current devns version (3.0.30)?  If so, do you continue having the same problem?

Share this post


Link to post
Share on other sites

yes i already tried upgrading to 3.0.30 but the problem still exists on that version

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

yes, it only occurs when PW is trying to access, when i ssh to the instance i can see and open the files. 

Share this post


Link to post
Share on other sites

Hi @pleini, just wanted to let you know that I'm moving this topic to the General Support area of the forum, as it doesn't seem to be related to any specific module per se. Thanks!

Share this post


Link to post
Share on other sites

@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.)

Share this post


Link to post
Share on other sites

This thread may be related:

Try clearing the module cache and see if that fixes your issue.

Share this post


Link to post
Share on other sites

i already tried with clearing the cache, but that did not help. The error occurs when i have nothing changed at the modules at all (nothing renamed, no modules installed or deleted).

Share this post


Link to post
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.

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.