ModuleBuilder overriding application language files


We are experiencing some issues with ModuleBuilder module regarding the creation of new modules and the application label files. We are wondering if it’s related with our server configuration but we can’t get reproduce a clear scenario. I explain:

Following these steps:

  • Go to ModuleBuilder in Administration.
  • Create a new package named a with key a.
  • Create a new module named b.
  • Check the label $app_list_strings['moduleList']['a_b'] = 'b'; in file custom/modulebuilder/packages/a/language/application/en_us.lang.php . The label is there as expected.
  • Create a new module named c.
  • Check the label $app_list_strings['moduleList']['a_b'] = 'b'; The label isn’t there anymore and it only appears the new label $app_list_strings['moduleList']['a_c'] = 'c';.

I’m guessing this is related with some php configuration, but not sure.

Can you reproduce this? Any advice?

Testing in 7.12.6 with PHP 7.4


I don’t use Module Builder, but I’ve heard there is classical limitation in it - you can’t re-deploy, I believe. But maybe I am getting this wrong… try to find something online about this known issue.

Thanks for your reply.

A few more data:

  • All happens inside ModuleBuilder, just before deploying, publishing or exporting the package.
  • We detected it after updating from 7.11.20 to 7.12.4.
  • Disabling Opcache solves the issue (just tested it).
    Here is Opcache current configuration:
|Directive|Local Value|Master Value|
|opcache.blacklist_filename|no value|no value|
|opcache.error_log|no value|no value|
|opcache.file_cache|no value|no value|
|opcache.preferred_memory_model|no value|no value|
|opcache.preload|no value|no value|
|opcache.preload_user|no value|no value|
|opcache.restrict_api|no value|no value|

Is there any parameter it might affect in caching/overriding files?

Ah. That is interesting, and much more certain than my vague answer.

An interesting test would be to flush the opcache at the right moment, and determine if that is enough to fix the problem.

There are several “reloads” and “refreshes” and “cache clearings” happening when stuff gets deployed in Studio and MB and in the QR&R. Maybe we just need to add one saying “if using opcache, flush it now”…

I tried inserting opcache_reset(); just before and after writing to the file.

Also before including it’s content:

But no luck.

If anyone else can reproduce this, it will help to understand it is a general problem. Then we can open an Issue in the repo.


1 Like