3

On my in-development version of a site I'm working on, I'm unable to access any of my custom fields without Craft displaying an error that reads:

Internal Server Error Function "dump" does not exist

I can navigate to Settings > Fields but when I attempt to click on any of my fields to check/adjust settings or when I try to create a new field, I get the error screen. I'm able to access all other parts of the CP, create entries, adjust settings, etc.

The odd thing is that I have a working instance of the site running in my local environment. As part of my troubleshooting process, I dumped the database on the staging site and imported my local version. I also replaced the "craft" folder on my staging site with the one from my local site. The problem still persists.

I recently updated to the latest build (2.1.2569) so I first thought something in the update might need fixing, but my local instance is updated as well and completely functional.

In case it helps, I'm hosting my staging site on Arcustech and have had no issues up to now.

Any ideas what might be going wrong?

2

Adding as an answer because it was confirmed via a support ticket that a plugin was at fault.

Twig's dump method is only available in Craft when devMode is enabled.

Turn it off, reproduce the problem, then search your craft/storage/runtime/logs files for [error].

The stack trace listed in that error log will show which plugin is causing the issue.

Chances are that plugin is calling Twig's dump somewhere in a template, assuming it will always be available, when that is not the case.

  • Out of curiosity, did you (or @AdamSnetman) notify the creator of the plugin? It would be great if they could solve that problem at the source, so it doesn't come up again. – Lindsey D Aug 20 '14 at 19:26
  • @LindseyD Adam's on it! – Brad Bell Aug 20 '14 at 20:27
  • Sweet, good lookin' out! Thanks Brad (and Adam)! – Lindsey D Aug 20 '14 at 20:29
  • Reporting back that I contacted the plugin dev (SquareBit Maps is the plugin) and he had a fixed version of the plugin back to me in under an hour. He also said that he'll be pushing a general update out later tonight. – Adam Snetman Aug 21 '14 at 0:49
  • That's service! – Brad Bell Aug 21 '14 at 1:22
0

I’m guessing you have some third party field type that is calling this nonexistent function. Try enabling Dev Mode and then going to a page that gives you the error. The stack trace will reveal what file was calling the function.

  • Hi Brandon. I enabled Dev Mode and I could navigate to those pages without seeing the error and presumably the stack trace that would go with it. (Is there another place I'd see the stack trace?) I remembered I'd recently created a field with the handle "htmlDump" and on a guess, I changed the handle to "htmlBlob", turned off Dev Mode and that solved the problem. So it seems to be some sort of odd naming conflict between my original field handle and something Craft thinks is a function that doesn't throw an error when Dev Mode is on. Thanks for your help, which led me to the answer. – Adam Snetman Aug 20 '14 at 16:46
  • 1
    Twig's dump (twig.sensiolabs.org/doc/functions/dump.html) is only available in Craft when devMode is enabled. Turn it off, reproduce the problem, the search your craft/storage/runtime/logs files for [error]. The stack trace listed in that error log will show which plugin is causing the issue. – Brad Bell Aug 20 '14 at 17:14
  • Ah, this is Twig’s dump() function that’s getting called. Which is only available when Dev Mode is enabled. So yeah, what Brad said. – Brandon Kelly Aug 20 '14 at 17:18
  • Thanks for the info. I can't seem to reproduce the problem, so now I'm not sure what to do. I'm just going to keep moving forward and see if it comes up again. I've renamed that htmlDump field handle anyway in case this was the problem. – Adam Snetman Aug 20 '14 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.