Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.I am getting an error for a Commerce module I know was never added or installed, and it is appearing in sites using this theme. I wondered if the problem could be a missing file trying to be loaded by the theme (not an uninstalled module).
User warning: The following module is missing from the file system: <strong>commerce_cart.</strong> In order to fix this, put the module back in its original location. For more information, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1128 of .../includes/bootstrap.inc).
I have this for about 10 other modules, all commerce_ ... modules.
Comments
Comment #2
april26 commentedComment #3
Jeff Burnz commentedNot a theme issue. See: https://www.drupal.org/node/2487215
Comment #4
april26 commentedThe website with the errors is very simple, and there have never been ANY Commerce modules placed in the modules folder, and definitely nothing installed and uninstalled.
I have the identical error on 2 websites, and both are "vanilla" D7 websites with only a handful of 3rd party utilities modules (ckeditor, metatags, etc.).
I don't understand much about the detail of this error, but I wondered if the following theme file is the problem:
In at-commerce/template.php on line 228 it says
$cart_theme = drupal_get_path('module', 'commerce_cart') . '/theme/commerce_cart.theme.css';on line 234 it says
$checkout_base = drupal_get_path('module', 'commerce_checkout') . '/theme/commerce_checkout.base.css';ON line 252 it says
$customer_admin = drupal_get_path('module', 'commerce_customer') . '/theme/commerce_customer.admin.css';etc.
These are amongst the missing modules mentioned in the errors. Are you completely sure that these are not causing the errors?
Comment #5
april26 commentedOn the template.php file I did the following, and so far it looks like the errors are gone.
i.e. I added the first line and closing tag for each commerce module mentioned with "drupal_get_path".
Comment #6
Jeff Burnz commentedyikes, looks like you're right: https://www.drupal.org/node/2581445
Gawd, look at the hack we're being asked to use:
$module_exists_in_filesystem = (bool) drupal_get_filename('module', 'module_name', NULL, FALSE);Comment #7
Jeff Burnz commented@ #5 hmmm, are you sure they're gone, module_exists() calls module_list which calls...
drupal_get_filename($type, $name, $filename = NULL, $trigger_error = TRUE), so in reality calling module_exists() should trigger the error anyway, which is why I believe the recommended way is #6 to get a TRUE/FALSE without the trigger waring (set to FALSE).Am I wrong here?
Comment #8
Jeff Burnz commentedE.g. (untested):
Comment #9
Jeff Burnz commentedI asked a senior Drupal developer about
module_exists(), he said he thinks it should be OK, however it's quite hard to see how that can be,module_list()does some caching but I can't see how it returns the module list wihtout hittingdrupal_get_filename(), so...Basically you could update to the DEV version (it's had
module_exists()checks for quit some time), or wait for some testing to be done, then I will release a new version.Comment #10
april26 commentedThey appear to be gone, even with "all error messages" on and caches cleared. My programming skills aren't great so it was more luck than good judgement that I found a solution to stop the error messages. And I may have caused other problems.
AT Commerce is the best D7 theme and I use it on dozens of websites. I often adapt the page and node templates, add bootstrap etc. making a version update nerve-wracking, so I am going to wait on this v7.50 update.
Comment #11
Jeff Burnz commentedFixed: https://www.drupal.org/project/at_commerce/releases/7.x-3.2
Comment #12
cconnolly commentedThanks to you, April26, for raising this issue and to you, Jeff Burnz, for developing & releasing a revised & fixed version of the theme so quickly...
Before I found this thread this morning, I'd been scratching my head most of yesterday with exactly the same problem, having just returned from holiday and decided to update to the v7.50 core before the "high risk" security updates were released, in case any were applicable to me.
I knew I'd never installed the modules referred to in the warning, and quickly realised it could only realistically be to do with the AT Commerce theme, but hadn't got any further. so you've both saved me a load of time today! :-)
Best
Colin C.