0

I have a View which is affected by several hooks ( views_pre_viewand views_query_alter, mainly). It works perfectly in the final user area, but when I am logged and go to the Views GUI, the browser displays the following error message:

 An AJAX HTTP error occurred. 
 HTTP Result Code: 500
 Debugging information follows.
 Path: en/admin/structure/views/view/NAME_OF_VIEW/preview/block/ajax
 StatusText: Internal Server Error
 ResponseText:

I see no error loging in the recent log messages, the browser keeps working, I can modify the View, but I am worried that something may broke later in the final user area. How can I debug what is happening? I have no previous experience in Devel or similar.

3
  • Any other log error which is related to views. – vgoradiya Oct 6 '16 at 6:09
  • 1
    Check if Apache error log has anything. – Yogesh Oct 6 '16 at 6:39
  • I have discovered the issue. In one of the hooks I was using a function which was defined in template instead of the module, so it didn't find it. The error was in the Apache logs, thanks for the suggestion. – Cesar Oct 6 '16 at 6:49
1

You are going to have to access the PHP error log file to determine the cause. Drupal may not always log an error since it the error may stop it from running. I would contact your host to see if they can provide you the log.

4
  • You are going to have to access the PHP error log file to determine the cause. Drupal may not always log an error since it the error may stop it from running. I would contact your host to see if they can provide you the log. – Shane Birley Oct 6 '16 at 6:52
  • As it is a dedicated server, I have access to the Apache log. There it was. Thanks. – Cesar Oct 6 '16 at 7:09
  • I didn't mean to add my comment as an answer (couldn't figure out how to remove it) but I am glad it helped. Was there a helpful error message? – Shane Birley Oct 6 '16 at 15:10
  • Yes, a function that did not exist, so I could trace back the error and copy/paste the function from template.php to mymodule.module. – Cesar Oct 7 '16 at 8:53

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.