Please help! I just disabled panels in build/modules and now I cannot load any page on my site. I deleted it in my modules folder, and then put the panels dir in there with no effect.

I'm lost.

Fatal error: Call to undefined function panels_get_path() in /var/www/modules/panels/plugins/task_handlers/panel_context.inc on line 24
Call Stack
# Time Memory Function Location
1 0.0004 64812 {main}( ) ../index.php:0
2 0.5911 43188756 theme( ) ../index.php:37
3 0.5912 43191696 call_user_func_array ( ) ../theme.inc:697
4 0.5912 43191696 template_preprocess_page( ) ../theme.inc:0
5 0.6941 45925236 theme( ) ../theme.inc:1877
6 0.6941 45925236 call_user_func_array ( ) ../theme.inc:656
7 0.6941 45925236 theme_closure( ) ../theme.inc:0
8 0.6941 45925236 module_invoke_all( ) ../theme.inc:1611
9 0.6951 45928540 call_user_func_array ( ) ../module.inc:483
10 0.6951 45928540 admin_menu_footer( ) ../module.inc:0
11 0.6966 46052972 _admin_menu_rebuild_links( ) ../admin_menu.module:142
12 0.6966 46052972 menu_router_build( ) ../admin_menu.inc:9
13 0.8078 50337872 call_user_func ( ) ../menu.inc:1728
14 0.8078 50337984 page_manager_menu( ) ../menu.inc:0
15 0.8204 51381332 page_manager_get_task_handler_plugins( ) ../page_manager.module:114
16 0.8204 51381332 page_manager_get_task_handlers( ) ../page_manager.module:776
17 0.8204 51381472 ctools_get_plugins( ) ../page_manager.module:754
18 0.8205 51381712 ctools_plugin_load_includes( ) ../plugins.inc:215
19 0.8224 51578952 require_once( '/var/www/modules/panels/plugins/task_handlers/panel_context.inc' ) ../plugins.inc:297

CommentFileSizeAuthor
#15 temp-screen-shot.JPG21.42 KBTheChemic

Comments

cmejo’s picture

This is line 24 for me: panels_get_path('css/panels_admin.css'),

cmejo’s picture

Status: Active » Fixed

Got it working after flushing cache.

jfinkel’s picture

Status: Fixed » Needs work

This is a terrible error, which I also just encountered. My entire site, including all Admin functions, were inaccessible. I worked around it by modifying the SYSTEM table to set the status of the module to 1. I will leave it activated even though I am not using Panels. Please fix this. Thanks.

merlinofchaos’s picture

Status: Needs work » Closed (won't fix)

Please fix what? You have to rebuild your menu cache. What am I supposed to do, come in and rebuild your menu cache for you?

winarto’s picture

pls teach how to rebuild menu cache when not able to access the website? thanks...

merlinofchaos’s picture

I would recommend you put the code back, use your admin/build/modules page to disable and properly uninstall the module, *then* delete it.

vladimiraus’s picture

That's exactly what I did: "use admin/build/modules page to disable panels module". After that I got the followign error ::
Fatal error: Call to undefined function panels_get_path() in /home/teddy/public_html/test/sites/all/modules/panels/plugins/task_handlers/panel_context.inc on line 24

Seems like a bug to me.

UPDATE: same goes for the latest 6.x-3.5 version
UPDATE: After enabling panels through a database and flushing all the cache and disabling them back didn't help. Still the same error.

hozt’s picture

I had the problem also and could only get the error to stop by using drush:

drush dis panels
drush pm-uninstall panels
drush dis ctools
drush cc

If you need ctools then activate it and any modules that may have needed it.

I would agree with VladimirAus that is is a bug in the uninstall process.

arnaudfischer’s picture

Same here

Fatal error: Call to undefined function panels_get_path() in /home/glamjuri/public_html/sites/all/modules/panels/plugins/task_handlers/panel_context.inc on line 24

No idea how to get around, I cannot access anything.

Humm ... just finishing up 5 sites, all with the issue.

Not experienced enough to disable from the db. Any guidance would be awesome! Thanks in advance :-)

merlinofchaos’s picture

Can one of you getting this error go to the line that is crashing and get me the results of a debug_backtrace() (if you've got Views and devel.module you can use a vsm_trace())

arnaudfischer’s picture

Merlin, thanks for the responsiveness. I feel a bit stupid, no idea how to do what you are asking. I would do it right now otherwise. Probably not worth even mentioning it. Sorry :-) I hope someone else is listening, though :-)

arnaudfischer’s picture

I managed to get back into my sites after clearing all the cache tables in phpmyadmin and uninstalled 3.5 Hura.

Merlin, which version do you suggest I use? 3.4 the most stable?

Thank you again for all the work going into panels. Awesome!

Romejoe’s picture

Status: Closed (won't fix) » Active

Same problem here:

I did disable Panels in the modules page and got:

Fatal error: Call to undefined function panels_get_path() in ......../drupal/sites/all/modules/panels/plugins/task_handlers/panel_context.inc on line 24

Did fix this by enabling the PANELS main module in the database (System table -> Modul Panels -> Change STATUS from 0 to 1)

May this be a problem with ctools instead panels?

TheChemic’s picture

Same problem here

Steps taken so far

  • Disabled panels module (error was produced)
  • No longer had access to any modules section (error produced)
  • No longer had access to update.php (error produced)
  • FTP Uploaded latest version of panels
  • Attempted to re-enable the module (No access to admin modules section - error produced)
  • Attempted to update.php (error produced)
  • Attempted to re-enable the module (No access to admin modules section - error produced)
  • Attempted to clear the cache (NO ACCESS - same errors produced when I clicked clear cache button)

I am basically locked out of this site. I have no access to modules anymore and no way to clear the cache now. ...Yes, please come clear my cache.

TheChemic’s picture

StatusFileSize
new21.42 KB

I was able to finally resolve the issues with the bug, though I am not skilled enough to produce a fix.

I commented out lines 24 and 27 from sites/all/modules/panels/plugins/task_handlers/panel_context.inc. I was then able to access the module sections. I was also able to clear my caches. After doing that I attempted to remove/uninstall panels entirely only to find more errors be produced related to advanced forums and chaos tools.

I re-installed panels and re-enabled it. I upgraded to the latest version of ctools and then ran update.php. As long as I do not remove or disable panels, I do not have errors. Not an ideal situation, but I didnt lose a full night of sleep, and I have a functional website (even if my users cant see the duct-tape under the hood)

Regardless of my frustrations, your code contributions are greatly appreciated. I only wish that I were skilled enough to build worthy modules.

merlinofchaos’s picture

I think this is coming from some caching that was added to the plugins as a performance boost. In theory a clear of the cache table (database command: 'TRUNCATE cache;') should remove the cached plugins.

merlinofchaos’s picture

As a test of this, in ctools/includes/plugins.inc there's this code:

function ctools_plugin_load_includes($info, $filename = NULL) {
  static $cache;
  if (!isset($cache)) {
    $cache = (object)cache_get('ctools_plugin_includes');
  }

Comment out the cache_get() line and if I'm right, the problem will disappear.

interestingaftermath’s picture

I was receiving this error and tried your latest idea merlin. It worked and I am able to navigate my site again. I flushed all cache, then uncommented the lines in plugins.inc. All back to normal! Thanks.

merlinofchaos’s picture

Status: Active » Fixed

I checked in a reversion of that caching to CTools this morning. CTools -dev should no longer experience this issue.

jeffbellamy’s picture

Thanks Merlin!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jaarong’s picture

Truncate cache; and updating to dev version fixed it for me.

jefflane’s picture

This is how I fixed this problem:

1) Open panel_content.inc (/sites/all/modules/panels/plugins/task_handlers)
2) Comment out line #24: panels_get_path('css/panels_admin.css'),
3) Comment out line #27: panels_get_path('css/panels_admin.css'),

Problem was that I couldn't access my admin pages to rebuild the menu cache. I'm sure there is a direct URL for doing so, but this was quick and dirty.

JF

Justincredible’s picture

Thank you jefflane your solution you saved my life.. and my job... I will pray for you daily until i die.. lol!

Anonymous’s picture

Had the same issue after updating to the latest version 6.x-3.3.

Did as Merlin suggested and did a Truncate cache and that solved the problem.

Now, who's responsible for the plugins caching issue so we can tell them about this :)

aren cambre’s picture

Version: 6.x-3.4 » 6.x-3.5
Status: Closed (fixed) » Active

Just ran into this problem, too. Agree with #25: please help us know where the underlying problem is so we can report it. Modules generally shouldn't break Drupal with PHP errors just because they are disabled.

I feel this should be active until the root cause is identified and a bug report is referenced.

merlinofchaos’s picture

Status: Active » Closed (fixed)

Aren, seriously? Did you even bother to read what i wrote?

Read #19. It's fixed in -dev. A new release hasn't been rolled yet. Get over yourself.

aren cambre’s picture

Oops, sorry, missed that detail.

heatherann’s picture

Problem was that I couldn't access my admin pages

Thank goodness for Drush, eh?

</panic>

pixelsweatshop’s picture

Can confirm that #17 did it for me.