-1

I am trying to add a node (/node/add/recipe), but it doesn't get saved. Instead, I get the following error message.

This page isn't working
localhost is currently unable to handle this request.
HTTP ERROR 500

I get no log messages associated to this attempt to add content. I went into node_save() to see how far it went, and it appears to stop near the beginning at $transaction = db_transaction();.

I have output $node to look for any clue.

Any suggestions on things I could try would be appreciated.

1 Answer 1

1

A few things you could try to debug the issue, as it appears limited to just this one "recipe" content type on your site (presuming you have a local running copy of the site):

  1. Enable php error logging in your site's settings.php as described here https://www.drupal.org/docs/7/creating-custom-modules/show-all-errors-while-developing
  2. Flush your Drupal cache, then try adding a recipe node.
  3. Upon saving, you should see php errors output to the browser, and you can tail the apache logs. This should help you further narrow down the cause of the error.

More than likely, one of the following is the culprit on saving your content:

  • There's a reference type/entity/field whose dependency has been accidentally deleted or modified (sometimes a machine name change, or settings change to a field widget can cause this, especially if there was data already present in that field)
  • A database field table has been corrupted/accidentally changed or deleted. This can happen if you installed some updated modules/Drupal core code without properly running updates from the "Run Updates" menu link or via drush updatedb
  • If you're uploading image(s) as part of the content, make sure they are optimized for the web and not gigantic in dimensions. Overly large images can freeze up/lock up on image cache generation due to limited memory.

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