I keep getting this message after install of D7.
Fatal error: require_once() [function.require]: Failed opening required '/Applications/MAMP/htdocs/webs/drupal-7.0/sites/ate7core/modules/ctools/includes/export-ui.inc' (include_path='.:/Applications/MAMP/bin/php5.3/lib/php') in /Applications/MAMP/htdocs/webs/drupal-7.0/sites/all/modules/ctools/includes/plugins.inc on line 724
Is this a known issue? I have tried a bunch of things, from increasing the memory limit, etc through to crawling through posts.
(this message was recieved by adding php.update to the end of the basic site URL. on localhost).
Its this or the white screen of death. Very frustrating. Going away in a few days wanted to take the laptop and play with D7 (no web access where I'm headed).
Any help/advice would be very much appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #74 | interdiff-1032054-66-74.txt | 810 bytes | papagrande |
| #74 | ctools-require_once_fatal_error-1032054-74.patch | 1.29 KB | papagrande |
| #66 | ctools-require_once_fatal_error-1032054-66.patch | 549 bytes | heddn |
Comments
Comment #1
droplet commentedctools isn't core module
Comment #2
merlinofchaos commentedLooking at the files it's trying to include side by side, I see something interesting:
Note that one of these is in sites/all/modules and the one it can't find is in sites/ate7core/modules -- why would that be?
Do you have two copies of the module installed, perhaps? One in sites/all and one in sites/ate7core?
Comment #3
alltooeasy commentedThanks for flagging this up. We've now moved off of the MAC platform hoping that a mirrored Xp system might work more effectively for the business. But I will def, look into this more for my own work. Much appreciated.
Comment #4
merlinofchaos commentedComment #5
ckngJust stumble upon this problem as well. Fresh install with default profile, no module disabled and no contrib module enabled.
Only 1 copy of ctools downloaded inside sites/all/modules/contrib/ctools
Comment #6
ckng- Clear cache does not solve the problem - NOT OK
- Removed ctools folder, cleared cache - NOT OK
What works for me is
- Removed ctools, views folders and cleared cache - OK
- re-download ctools, views, no more errors..
Notes:
- ctools and views are not enabled
- Views is 7.x-3.x-dev (2012-01-11/1326243394)
Comment #7
merlinofchaos commentedMy guess is that you've got an artifact of either having multiple copies of CTools or of having moved your copy of CTools and Drupal's module location cache is still pointing to the old location. I don't think there's much that CTools specifically can do about that.
You may have to disable CTools via database (set it to status 0 in the system table) and then re-enable it in the UI once you are sure there is only one copy of it in the system.
Comment #8
kenorb commentedI've the same problem, it happened when I've checkout different git branches couple of times (now I'm on the same codebase&db that it was working before).
The error says:
SQL paths are missing:
Those paths were correct (cached) on the old branch, but on the current branch aren't (because of Drupal core upgrade, Acquia => Drupal).
Solution to that problem should be rebuilding system table by clearing the cache, but the problem is that there is no way of clearing the cache without experiencing that Fatal error.
See:
When clearing the cache manually (drush sql-query "DELETE FROM {cache}") - it doesn't help, because the error happens before the cache is cleared.
See the attachment with backtrace from Drupal UI, I don't have backtrace from drush.
As workaround this helped:
1. Going as admin directly to: /admin/modules
It should rebuild some stuff.
2. Now clearing the cache: 'drush cc all' should work.
Comment #9
kenorb commentedRe-posting the file, probably hash in the filename broke the upload.
Comment #10
merlinofchaos commentedkenorb: Compare your paths carefully:
/Users/kenorb/Sites/AAT/docroot/profiles/acquia/modules/ctools/Users/kenorb/Sites/AAT/docroot/sites/all/modules/contrib/ctoolsDrupal does not handle having two different versions of a module in place elegantly.
Comment #11
kenorb commentedComment #12
kenorb commentedYes, the module was only in one place at a time, I've checked that. But the path of module is different when switching between the branches.
Every time when I was changing the branch, I've cleared the cache to refresh the paths.
The paths in profiles/acquia/modules/ctools were correct only in the old branch, but not valid in the current branch.
So after changing the branch to current one, system table still had the old paths cached, even the module wasn't there.
When I was trying to clear the cache, I had the CTools Fatal error preventing rebuilding the system table.
So the actual Fatal error is when drush is trying clear the caches.
Comment #13
kenorb commentedComment #14
merlinofchaos commentedHmm. Okay, that's definitely a pain. Manually updating the system table would solve the problem but isn't exactly a good solution. I'll have to look into the exact flow that rebuilds the system table and see if there's a way to make CTools behave better to at least prevent fatal errors during that process, I guess.
Comment #15
kenorb commentedIssue described step by step (not always reproducible):
After some playing around on the same branch (charlie_dev_20120327_2 ) I've managed to fix it:
The problem is difficult to reproduce, sometimes it just works, sometimes is not, weird a stuff.
I could provide some xdebug file, but it's like half a gig.
Basically it shouldn't throw any error during clearing the cache, as mentioned in #1, it isn't part of the core.
UPDATE:
Temporary fix is done in following order:
Comment #16
alltooeasy commentedHmm, wasn't able to reproduce this. I suspect a bug/module combination (or lack of!)
Moving off of MAMP onto AMP installed Natively seems to have resulted in a generally much smoother dev process.
However the rule here is back up/clone/copy/save etc as much as possible!
I've lost days (weeks!) to this kind of problem.
Thanks so much for the detailed responses.
Comment #17
jlyon commentedHave a look at http://drupal.org/project/registry_rebuild.
Comment #18
thim commentedI followed jlyon his advice #17 and used the registry_rebuild module and this fixed all the miss Fatal error: require_once()
Comment #19
mediaformat commented+1 registry_rebuild, solved things for me also.
Comment #20
alamp commented+1 register_rebuild works fine for me as well!
My error was
Comment #21
pal4life commented+1000 for registry rebuild, worked for me as well.
Comment #22
andrea_london commentedafter 4 hours of troubleshooting, registry rebulid via drush solved the issue for me, that was what i was looking for
Thanks +1
Comment #23
jonathan.henderson commentedJust in case someone has the same problem as me:
I had moved some modules from a multi-site subfolder to the sites/all folder.
I was still receiving the "require_once(): Failed opening required.." errors even after running Registry Rebuild.
I noticed that in the error message the path of the file generating the error was the path that I had moved the module from (i.e. the file didn't actually exist there any more yet the error was still coming from there)
I figured that the APC caching had cached the file in the old location (a guess).
I restarted PHP (php5-fpm in my case) and that fixed it.
Comment #24
Skeptimom commentedRegistry Rebuild & a drush rr fixed my error upon uploading a SQL dumpfile. HOORAY and thank you.
Comment #25
Anonymous (not verified) commented#6 worked for me
Comment #26
kikecastillo commented#24 This definitely worked for me. Thanks!
Comment #27
kenorb commentedComment #28
nicolas bouteille commentedIn my case I was trying to include node_clone/clone.pages.inc so I called ctools_include('clone.pages', 'node_clone', ''); but the module name is actually 'clone' not 'node_clone' AAHH! so I had to change it to ctools_include('clone.pages', 'clone', ''); for it to work.
I had a very hard time to find that because by default, when the name of the module does not exist, the path in the error message is path_to_drupal_root//name_of_unknown_module which makes you think you have a copy of the module at your drupal root...
and it turns out that I actually also had a backup of the node_clone module stored in my Drupal root!!! What were the odds!? So I started deleting it and rebuilding the registry but the error would not go away... obviously. Damn you node_clone for not giving the name of your module to your module's folder!
Comment #30
jenlamptonCross linking all the other issues I've found that started because of this change in Ctools 7.x-1.6.
#2461809: Cannot delete custom theme layout directory
#2207147: Fatal error: require_once() panel_context.inc
I'm also changing the status because I don't see a patch in this issue that was committed that fixes this problem. It's still a pretty serious bug IMO. Files that are not being used should not be require_once'd! ESP if it means fatal errors that can not be recovered from w/o a registry rebuild.
Comment #31
aprilr commentedI had this issue with commerce (not ctools) after a fresh drupal installation. Running the Registry Rebuild (#17) cleared it up for me.
I did have to run it twice...
Thanks!
Comment #32
yakoub commentedtemporary workaround :
run this sql query directly to database .
then delete the plugin directory you wish to be removed .
Comment #33
snathaidmhor commentedI'm seeing this issue as well on a site with ctools, panels, panels_style_collapsible, that has a panels-layouts plugin in a theme. We are in a central hosting environment using Aegir. On cloning from an existing site to a new site with an updated platform (core and module updates), the clone fails with the following error:
Tried registry rebuild once prior to cloning = no go.
Tried flush cache and registry rebuild once (or twice) prior to cloning = no go OR worked once
If I clone the original production site to the exact same platform and then flush cache and registry rebuild before cloning to the new platform = works every time (so far). However, flushing cache and running registry rebuild once or twice and then cloning straight from a production site to the new platform rarely works.
Comment #34
kenorb commentedComment #35
reg commentedI just came across this and got no joy from running "drush rr" unfortunately. My exact error is below:
I got this by:
Whether doing that on a clean install will reproduce it I don't know but I thought I would give the steps in the hope it makes it reproducible.
Comment #36
reg commentedI'm going to copy this over to https://www.drupal.org/node/2466845 because it has the same line number so it might be closer to my problem although I suspect they one of the same.
Comment #37
reg commentedUpdate: In my case running drush rr and clearing all cache didn't fix it however restarting memcached did so I would say in my case it's a problem with memory caching.
Comment #38
capfive commentedHere was my case, also #24 fixed my issue
Had a bootstrap theme that I disabled and deleted, it also had some custom panels layouts, and once it removed them, this error came up
Rebuilt the registry and it is now fixed :)
Comment #39
leewillis77 commentedWe've just hit this as well. In our case, the cause is moving a module from sites/all/modules/contrib/ to sites/all/modules/patched/
In our case the module that moved was video_embed_field - however presumably moving the location of any module that implements a ctools plugin would cause this behaviour.
The error in our case is:
So - it's trying to load the plugin from the old module path (under sites/all/modules/contrib), not the new (sites/all/modules/patched).
Obviously since this error is thrown during a cache clear it makes it difficult to proceed.
Comment #40
yakoub commentedtemporary workaround :
run this sql query directly to database .
then delete the plugin directory you wish to be removed .
Comment #41
anybodyTemporary workaround from #40 worked but this problem still exists and is really not nice for themers.
Comment #42
joelhsmith commentedIn my case, I had moved a Feature module from one folder to another folder. It gave me the same error. Steps to resolve issue for me:
1. Disabled the offending module via drush,
2. drush rr (registry-rebuild),
3. drush cc all,
4. re-enabled the module,
5. drush cc all.
Comment #43
Greennos commentedHi there, I'm sure you can help me with the same failure using very basic comments as I'm quite unfamiliar with command lines. Furthermore, my website is homed at 1and1 and I can't seem to have command lines, unless someone knows how to?
Here is the message i have from my Drupal after updating it from the admin pages:
Fatal error: require_once(): Failed opening required '/homepages/17/d393243800/htdocs/clickandbuilds/Drupal/DrupalOPS/sites/all/themes/omega/omega/panels/layouts/omega/omega.inc' (include_path='.:/usr/lib/php5.4') in /homepages/17/d393243800/htdocs/clickandbuilds/Drupal/DrupalOPS/sites/all/modules/ctools/includes/plugins.inc on line 477
Thanks a lot for help!
Comment #44
kenorb commented@Greennos Try clearing cache, if doesn't help, you've to check if you uploaded all files to the server, so you don't have anything missing. If you've further questions/issues, try asking at: Drupal Answers.
Comment #45
Greennos commented@kenorb
How to clean cache? I've tried the "drush cc all" command line from my ssh without success. It replies the command is not found...
Comment #46
kenorb commented@Greennos You've to find the right ticket to discuss it, or raise a new ticket either at Drupal.org, Drupal Groups or look for existing posts or ask at DA as without knowing your exact error message, it could be anything (missing drush, wrong PATH value, you're not executing in docroot, you're not specifying your site profile, misconfigured drush, etc.), and nobody will answer you here, as you're currently posting it at the bug report of ctools, so your issue I guess is not related this this, and you can easily annoy other people who're subscribe to it.
Comment #47
Hancock Glen commentedFatal error: require_once(): Failed opening required '/home/hancockg/public_html/hancockglen.com/sites/all/modules/ctools-7.x-1.7/ctools/plugins/content_types/node/node.inc' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/hancockg/public_html/hancockglen.com/sites/all/modules/ctools-7.x-1.9/ctools/includes/plugins.inc on line 477
This after updating. Happened after trying to update to 1.8 too
Comment #48
robloachComment #49
robloachThis changes the require to an include so you get a warning rather than a fatal error.
Comment #50
yakoub commentedyou can't change require to include and claim you solved the problem .
Comment #51
reg commentedEssentially what you are doing with that change is causing PHP to generate a warning when it can't include the file instead of stopping on a fatal error. That's more dangerous than before.
Comment #52
kenorb commentedComment #53
ChrisValentine commentedJust backed myself into a corner with this one too in trying to update a couple of sites to 7.41 - going round in circles! In fact I just cleared the caches and now I've got nothing at all!
Chris.
Comment #54
fubarhouse commentedI've got this issue popping up everywhere now!
I've updated my build scripts to include a couple of drush commands to clean up the module paths, but it basically started for no reason after completely rebuilding some vagrant boxes and it's recovering module locations which are at least 4 months old.
Thanks to those who've provided temporary fixes, but ultimately a proper fix would be good.
Comment #55
mrromios commentedHi all!
I also have this problem everyday)
I think need to just make a file_exist() before require_once().
Comment #56
reg commented@Darth RomiOS: I'm not sure if that's a good solution. If it is rightly expecting the file to be there then ignoring that the file doesn't with file_exists() could just be a way of letting your site degrade.
You might be better off that it stops you to fix the problem. I'm not really sure but checking the code carefully and making sure you fully understand it before making such a change would be a smart move.
Comment #57
mrromios commented@Reg. If you read the description of issue, you can see that the problem related with cache: ctools try to make require_once for cached file paths and fatal error doesn't allow to clear cache via admin page / drush. Checking of file existing (with some warning message if file doesn't exist) can solve this problem. module_load_include. There is good solution i think.
Comment #58
reg commented@Darth RomiOS: Yeah, it has been a while since I read the description, it sounds like you've done your homework so it sound good to me.
I think the only thing I might add as an idea is that adding some code that once a "file is not found" type problem is detected that perhaps writing a routine (or whatever, a call to exiting function etc.) that clears all that cache automatically might be appropriate. Then if the structure of the code allows you could pick up the new/proper/"if it exists" location of the desired file and try again. If it fails on the corrected retry then issue an error.
This way we won't ignore the problem if there really is one and it's not just an outdated cache issue.
Comment #59
mrromios commented@Reg. I think, the main idea of this issue, it is possibility to move ctools plugins without fatal error. So, there are no need extra rewriting. Just replace fatal error on warning to keep site alive :)
Comment #60
yakoub commentedconsider the temporary fix i wrote at comment #40 .
the required resolution to this problem must include cleaning the cache and not only avoiding generating an error .
because if you keep the cache state inconsistent then other problems might rise that we can not predict .
Comment #61
reg commentedI tend to agree. If you know the cache is wrong you need to clear it. If not all of the ctools cache then at least the entry you know is wrong.
I'm not sure what causes the ctools cache to become invalid... if it's modules being moved/added/deleted then probably invalidating the cache entry you found to be wrong would be a nice precision fix but if it's something that can get invalidated just through usage of the site then probably you want to clear all the ctools cache upon finding an error.
Comment #62
mjbragg75 commentedI wish I had seen items 48/49 two weeks ago. No hair left. (OK, not much before). This is my first "real" engagement (pro-bono, but very visible), and I am way behind now.
For a long time I thought it was the conflict between CTools and Currency (and related modules). And of course I couldn't fix.
In fact, after doing the "include_once" fix, and getting things working, when I upgraded from CTools 7.x-1.5 to 7.x-1.9, it broke again in the same way. Even with Currency gone (my design no longer needs it). So I had to re-apply the "include_once." Was also surprised to see the /currency/currency/ctools.... path re-appear with 1.9.
I will feel more comfortable once there is a different fix.
Comment #63
usama009 commentedI my case that error comes when i install Commerce Billy Mail 7.x-1.0-beta5 module.
This error also disables my other commerce billy functionality that I installed and disable all blocks which are created by commerce billy module (commerce billy module is already checked).
Comment #64
anybodyI'm the maintainer of commerce billy mail but I have no clue about a connection of these two problems. Any ideas what might cause this? Does the same problem exist with the latest .dev version of commerce billy mail?
Comment #65
usama009 commentedSir Anybody I press back button of a browser and flush all cashes it takes time but clear my problem and then I uninstalled commerce billy, commerce billy mail and commerce reports modules clear cashs, reinstall modules and clear cash again this solves my problem thank you for such a nice module. (I am talking about beta version).
Comment #66
heddnI've started seeing this (highly annoying) issue a lot in the past 6 months. Finally tracked it down today to this issue. The problem seems to be where a file is renamed or deleted. Let's fix that by checking if it exists first.
Comment #67
yakoub commentedi don't see how #66 logic is different than #49 .
both of them are insufficient solution to this problem .
Comment #68
heddnIf the file doesn't exist, you cannot require it or use it. Period. Magic won't happen to create it. If you rename a ctools plugin or delete one, with the patch in #67, you won't have an inoperable website. Without the patch, the site stops working.
Comment #69
yakoub commentedpatch by patch of this poor quality solutions will by time lead to module becoming full of holes .
no yet to consider #40, which is the first thread to find the correct solution .
Comment #70
muschpusch commented+ 1 for #49 throwing a warning is correct since some ctools plugin disappeared or has been moved. We face this problem a lot when switching branches. @kenorb you moved the state to needs work. Why? What is the desired behaviour?
Comment #71
kenorb commented@muschpusch This was change as per #50 and #51 concerns. If there are no concerns anymore and it works for more people who tested that patch, change it back to Needs review.
Comment #72
japerryPushing this up to critical. If a module or file is removed/updated it kills sites, especially production ones. The patch in #66 is a decent start.
Comment #73
papagrandeThe patch in #66 works for me, but I added a bit more to prevent the fatal error for page manager users along with a useful message. To keep things moving though, I'd be fine with committing #66.
Comment #74
papagrandeFixed the paths in my #73 patch and provided an interdiff with #66.
Comment #75
edison_doulos commentedHi, I had a similar issue.
I solved in this way (with Terminal):
1. Locating under my project folder.
2. Running the following commands:
drush sqlq 'truncate table cache'drush cc allNote: Drush installation is required, if you are using MAC this guide can be helpful.
Comment #76
yakoub commented@edison_doulos i wrote similar solution in comment #40
Comment #77
mdelreal_ricochet commented#42 did it for me, plugins.inc under /modules/contrib/ctools was trying to include ctools_export_ui.inc from /modules/ctools (which didn't exist) disabling ctools, doing a rr and then clearing the cache and finally reenabling the module solved the problem.
Comment #78
aprilr commented#17 to the rescue once again! :-)
Comment #79
amjad.khan commentedthe file is missing in the location. added the file and solved the issue.
regards
Amjad Khan
http://ezsolution.mobileaps.in/
Comment #80
joelpittetnit: break the else on to a new line.
What about a
watchdog()message instead?Comment #81
fox_01 commented#74 fixed it for me. i deleted the ctools plugin file and then after the first drush cc all the message showed up that a files is missing. after the second drush cc all there are no messages anymore.
Comment #82
papagrandeThis got fixed in #1775612: ctools calling missing file with commit #b2acc43 to the dev version.
Comment #83
yakoub commentedquote the Exception : "If you have recently removed this plugin then please clear your cache."
if clearing cache solves the problem, this whole issue wouldn't have been opened in the first place !!!
see my comment at comment #40
Comment #84
sandeep.m.das commentedThe following is essentially the same as described in #75, which is using drush. In my humble shared hosting development server, drush was not available. Those who are not good with drush or unable to access it may find this post useful.
I encountered this error, and the problem was the ctools folder appearing in 2 instances in my site's folder. That is, there were two ctools folders, one inside the modules folder and the other inside the profiles folder. Managed to solve it by:
A. fired up putty and logged into the (shared) server. Navigated into the site's folder. Located all ctools folders by running a find command. Renamed the one inside modules folder. *
B. fired up PHPMyAdmin and logged into the site's Mysql DB.
C. located and truncated every table that has the word cache in its name. I did so by maintaining the foreign key restrainment ON.
D. loaded /update.php in browser. It came up with exceptions as mentioned in #83. I ignored everything and clicked the Retry link.
E. site is back on rails! Cleaned-up my operation by deleting the renamed folder.
NOTES: *If you CAN'T find more than two instance of a culprit module (in step A) the problem could be something else; doing the remaining steps may not help you out.
*Taking a backup copy of your DB is good idea before attempting step A.
Comment #85
ugintl commentedNot sure, but I guess https://www.drupal.org/node/2461809#comment-9999253 is the solution
Comment #86
yakoub commentedya, i suggested that solution too : https://www.drupal.org/node/1032054#comment-10302241
but nobody seems to take it seriously .
Comment #87
biggm commentedIt's worth noting that in my instance receiving this error I consistently fixed it by: