Questions tagged [debugging]

Use it for questions about module and theme debugging (e.g. "How do I debug this situation?").

Filter by
Sorted by
Tagged with
4
votes
2answers
4k views

How can I see what variables are available on the loaded page via the devel PHP Execute block?

How can I see what variables are available to me on the page i am viewing via the PHP Execute block? I'm trying to do a dsm($node) but that doesnt seem to work. Neither does dsm($page).
4
votes
2answers
3k views

How to debug a rule that doesn't want to fire?

I have nodes that can be flagged with a global flag. When a node is updated I want a rule to unflag that node. Rules Event: After updating existing content Rules Action: Unflag a node. I then select ...
4
votes
3answers
6k views

What is the difference between the various log messaging severity levels?

There are several types of log messaging severity levels - emergency, critical, error, alert, info, notice, warning, debug. What does each level mean? Example, emergency and critical sound similar, ...
4
votes
1answer
4k views

Variables dump to Javascript console

Is there any equivalent of var_export or var_dump available in Drupal, that would output variables directly to the console object (FF, Chrome - console.log() or console.info())? I just don't feel like ...
4
votes
2answers
1k views

How to debug merge query?

I have a simple merge query, with one key and three fields, something like: $query = db_merge('product') ->key(array( 'id' => $id_product, )) ->fields(array( 'name' => $form_state['...
4
votes
1answer
3k views

Is there an AJAX command I can use to debug PHP variables without breaking AJAX call?

I know the list of Ajax framework commands. Every one of them is doing something useful. But sometimes I want, for debug, include a piece of debug data in my AJAX response. I want it to be unobtrusive,...
4
votes
1answer
419 views

posting a comment on cached page

I am a bit confused now - is it normal behavior that posting an anonymous comment on cached page invalidates ALL cached pages for whole site for current anonymous user? Beacouse that is exactly what I ...
4
votes
1answer
944 views

How to speed up Drupal 7 calls to _theme_process_registry?

Using xhprof php profiler I can see there is much more then 100000 calls to function_exists each time user accesses a Drupal 7.8 page, mostly from _theme_process_registry. What to do to limit the ...
4
votes
3answers
748 views

Debug arrays from hook_cron?

Does anybody know of the proper way to debug objects from within hook_cron? I'm trying to set up a task that periodically deletes backups from my private folder, but I can't properly debug arrays that ...
3
votes
3answers
7k views

What is easiest way to debug variables in nodes, views, blocks and page twig templates?

What is easiest way to debug variables in nodes,views,blocks and page template. Earlier we used devel module in drupal 7 ,by using dpm() function it shows very neat and clean structure ,it was so ...
3
votes
4answers
192 views

Why do modules have bug reports?

A good question was raised in this comment by EGHDK: Why do these modules have bug reports. Shouldn't this be a simple task for a module to complete with no errors? He was referring to limiting ...
3
votes
2answers
2k views

How to show all template suggestions for a page without using Devel Themer?

For some reason the Theme developer module doesn't work on my site (whenever i activate it and navigate on my site it just shows a white page with written "Jump to main content"), but all I want to ...
3
votes
2answers
1k views

Protect drupal code injection from url

Recently my drupal site is hacked. When i see website log from drupal admin panel someone trying to inject code from url. I searched my website(drupal) directory lots of code in page appended and new ...
3
votes
7answers
5k views

Twig debug statements not appearing

Still new to Drupal, but I've read over the docs countless times and can't figure this out. I'm not seeing Twig's debug comments. I am using a sub-theme of 'Bootstrap 3'. Running on local environment ...
3
votes
1answer
2k views

Drupal 7 - Array to string conversion in DatabaseStatementBase

I have an error on a Drupal 7 site that I cannot solve. Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2168 of ... I cannot use dpm, can't find a way to debug, and ...
3
votes
2answers
2k views

page.tpl.php override for Panels Pages?

I want to use a specific tpl.php file for all Panels Custom pages. I get some formatting issues if I try to use "Panels Everywhere" module, so would like an alternative.
3
votes
2answers
127 views

Views_view_result and Devel possible incompatibility

I have experienced a very strange behaviour of Drupal 7. I had Devel module activated, and a View which made the sql logs to disappear from screen. The view was used by views_get_view_result(). When I ...
3
votes
1answer
143 views

Developing for Drupal 7

I am trying to wrap my head around the Drupal 7 framework using the debugger in eclipse. The thing is, I'm feeling a little overwhelmed with the endless function calls and watching data bounce back ...
3
votes
4answers
964 views

How to debug Drupal Forms

Sometime back I'd gone through a Lullabot video that showed me how to simply click a form and see all its elements using Krumo using Devel module. But I've searched all internet I'm not able to find ...
3
votes
2answers
3k views

How to generate the function stack trace of the last request made?

Is there a module that can essentially show you the function stack trace of the last request made? Say I have a form that I submit. After the page loads with the result from the request, I would ...
3
votes
3answers
2k views

Site in offline mode, any way to debug how this happened?

I came in this morning to find my companies site in offline mode. I personally checked with the only other site admin, and none of other users have the ability to turn off the site. I was using the ...
3
votes
3answers
4k views

Need to print all the function calls Drupal makes

I need to examine all the function calls Drupal makes during it loads a page (even if there are no errors). I guess debugging software can do this but I would also like to know a way to do this ...
3
votes
1answer
560 views

Settings contains a dot which is not supported, but module gets enabled properly

I'm developing a search engine module for Drupal 8. On a clean new Drupal website, I can install it from the admin GUI, but when I enable it I have the classical white screen (The website ...
3
votes
1answer
798 views

Turning on verbose logging

Is the "Verbose logging" in Drupal actually the PHP errors that can be activated in various ways (.htaccess, php.ini, settings.php) to be seen on screen? Is it drush ws --full ? From the material I'...
3
votes
5answers
2k views

How to inspect a variable when testing with `drush test-run`.

When testing with my SimpleTests, I want to inspect a variable. var_dump() and the likes are not being rendered in the output of Drush, Xdebug interactive debugger does not work due to the simulated ...
3
votes
1answer
2k views

Displaying page execution time using devel

How is it possible to use devel module to show Page execution time on a site? I enebled it and it shows numbers only on admin pages. Thank you for help.
3
votes
1answer
132 views

Difference between $bundle and bundle()

Background information: I'm trying to manipulate the available options of a list type text field, depending on the host bundle: function wtbase_options_list_alter(array &$options, array $context) ...
3
votes
1answer
1k views

How to debug 404 on user/login user/register user/logout?

I have a Drupal 8 site on 8.4.2. When I upgrade it to 8.5.1, after running the database updates, the paths /user/register, /user/login, and /user/logout return a 404. I can log in with Drush (drush ...
3
votes
3answers
3k views

Enable Twig debug doesn't work?

Why isn't the Twig debug working on my Drupal 8.2.6 site? This is the folder structure. These are the folder permissions. This is the content of the settings.php file. $settings['hash_salt'] = '...
3
votes
1answer
62 views

How should I file an issue on drupal.org that affects multiple modules?

I have an issue that is caused only when three modules are enabled together (logintoboggan, pathauto, and entity). When I upgrade entity from rc1 to rc3, one of the functions of logintoboggan breaks ...
3
votes
1answer
332 views

l() is not being called correctly in menu.inc

I had been getting this error message: PHP Fatal error: Unsupported operand types in /var/www/www.ruv.is/pressflow/includes/common.inc on line 1588 So I did a backtrace and this is what it ...
3
votes
2answers
221 views

What might cause the unexpected workflow state changes after executing a rule?

I want to change the workflow state to draft from publish and unpublished the node on edit. I used rules for this: For Unpublish: For publish: When I edit a node and save it, workflow state changes ...
3
votes
1answer
639 views

How can I fix, or troubleshoot, Fatal Error Class not found with XHProf Module [closed]

I'm seeing the following error when I enable xhprof in Drupal 8 either via Drush or via Composer. Class 'Drupal\xhprof\RequestMatcher\XHProfRequestMatcher' not found in /var/www/mysite/docroot/...
3
votes
1answer
216 views

Why does Rules event 'After updating existing content' not result in 'Create a new comment'?

I've used Create a new entity for the Rules event After updating existing content, but nothing happens. Is it a bug? Update: Here is an export of my rule: { "rules_update_order" : { "LABEL" : "...
3
votes
1answer
344 views

How to troubleshoot Rules when a required variable for an event is not provided?

I'm seeing a strange behavior on my site and I'm trying to figure out how to correct it. I have a rule that triggers on the event After updating an existing user account. This rule uses two ...
3
votes
1answer
1k views

How can I trace the source of a redirect error listed in Administration -> Reports?

Under Reports -> Recent log messages, I have a large number of errors such as the following: Type: access denied Date: November 7, 2013 User: Anonymous Location: https://mysite.com/ja/user/en/user/...
3
votes
3answers
427 views

problem with hooking node add/edit form

I wanted to hook node/add/patient-history form because I wanted to add ajax in that form. Before adding Ajax I wanted to get field names correctly. So I tried this: function ...
3
votes
1answer
4k views

What causes the error “Call-time pass-by-reference has been deprecated?”

My understanding is that objects in PHP 5.3 are all passed by reference so using the &$ notation is not necessary. My problem is using date_views module where I'm getting this error. Deprecated ...
3
votes
1answer
57 views

Debug PHP code with XDebug and VS Code [closed]

For development I use a local Drupal 7 installation on Xampp under Windows 10. I use Visual Studio Code as IDE and want to debug my PHP code with it. I tried to set that up but can not quite get it ...
3
votes
2answers
1k views

How to debug Batch API more efficiently?

I've some issues with Feeds importing (I don't want to focus on particular case) and I'd like to find the way of able to debug Batch API processing more efficiently. Given the fact of complexity of ...
3
votes
1answer
10k views

How to fix the useless 'favicon.ico page not found' log message? [duplicate]

Why is Drupal looking for it in the root dir in first place? The favicon is always placed inside theme at sites/all/themes/mytheme/, but it's looking for favicon.ico inside home / dir. When browsing ...
3
votes
1answer
722 views

For Drupal 7, is there a hook debug mode equivalent to the theme debug mode?

As a beginning developer, it seems like I spend a significant percentage of my time googling to find out what hook to call in order to modify something before it renders. In the drupal 7.33 release, ...
3
votes
1answer
1k views

Huge delay on first request due to many slow SQL queries [duplicate]

Possible Duplicate: Performance Problem: Delay on first request The first page of my site takes up to 15 secs to load and then the site become responsive. If I leave the site for 20 min or so, ...
3
votes
1answer
175 views

How to attach xdebug to drush in docker

How can I "attach" xdebug to drush in a docker container? By that I mean, how can I have xdebug show me a history of an import script? And to look at the single variables that are defined and ...
3
votes
1answer
253 views

Output array data on drush error when showing stack trace

I'm trying to install a module, but its giving me errors during a drush enable. It shows the stack trace log and I can see it has something to do with the flag_lists_type during the install process. I ...
3
votes
1answer
1k views

How to embed a Rules Link in a View in order to trigger a Rules link to run?

What is the general process to embed a Rules Link in a View in order to trigger a Rules link to run? I have used the Rules Link module to create a Rules Link embedded in a View (it's a View that ...
3
votes
1answer
635 views

dpm function doesn't display results for arrays

I need to work over the hook_menu_alter function and I found that the dpm() function is not working for arrays. I have devel and admin_devel enabled. I flushed all cache to make sure the hook is fired....
3
votes
1answer
698 views

webform + webform_entity gives empty view results :(

I am using Webform + Webform_Entity to show webform results as node content used in Views on certain pages. Here is a screenshot of 1 webform_entity form. The form collects 2 taxonomy terms (from the ...
3
votes
1answer
520 views

How to display devel dpm messages on a panels generated page?

I am testing a custom module for a site using Panels Everywhere & Panels. I need to put the results of a Devel module dpm() message into a pane so that I can see it on page displays. Does anyone ...
2
votes
2answers
9k views

dump(), kint() & print_r() are not working in .theme file

I've used drupal 8 with devel module. I want to change some values dynamically in views fields. So i tried to use theme_preprocess_views_view_fields(). When i tried to print variables using print_r(), ...

1
2
3 4 5
11