Questions tagged [debugging]
Use it for questions about module and theme debugging (e.g. "How do I debug this situation?").
545
questions
0
votes
1answer
28 views
Finding and display custom user variables
I have create a series of user fields. Some of these fields reference taxonomy terms, require a mobile number or are just basic text fields. I used the below to print one of the fields (the number ...
0
votes
2answers
1k views
Is there any template debugging technique similar to Twig debugging?
David Rothstein pointed out in the comments that as of Drupal 7.33, this functionality has been back-ported to Drupal 7.
Is there any template debugging technique similar to Twig debugging?
1
vote
3answers
10k views
The website encountered an unexpected error. Please try again later (WSOD). Debugging scenario
After updating Drupal using drush my website says 'The website encountered an unexpected error. Please try again later'. with white screen(WSOD).
Then when I tried to rebuild-cache using drush there ...
0
votes
1answer
2k views
500 (Service unavailable (with message)) on login or register
Effectively the same as this (Drupal 500 Internal server error on login page) but i am unable to bump or comment so resorting to adding my own question.
The site is running Drupal 7.54 php version 7 ...
6
votes
2answers
1k views
Can't get drush script to stop at breakpoint with Xdebug/Phpstorm
I had this working on another Drupal VM, but for some reason I can't get it to work anymore. I am trying to debug a Drush migration script and I have some breakpoints put in but it never stops at the ...
1
vote
0answers
123 views
'unexpected error' when visiting any page the first time, but not the second
Quite suddenly, my site has begun behaving erratically. No matter whether the page is an admin page, or a page using my custom theme I receive the 'unexpected error' page whenever I visit the page for ...
0
votes
1answer
320 views
Proper debugging of REST Resource due to cache
I'm creating some REST routes for my custom resources and I'm having some trouble with the debugging aspect of development.
Every time I change the resource's code, should I need to XDebug it, I need ...
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'] = '...
1
vote
1answer
160 views
Why can't I run krumo() on a node page?
I called krumo() inside hook_node_load().
function mymodule1_node_load($nodes, $types) {
krumo($nodes);
}
It works on my front page, but not on a node page. I get this error message:
Fatal ...
1
vote
0answers
36 views
Drupal Site No Longer Rendering a Specific Theme - How to Troubleshoot?
I have a Drupal 8 instance running on a Ubuntu 16.04 virtual machine through Apache2 to test with and learn Drupal.
Up until today, everything has worked correctly, but on starting my VM this morning ...
0
votes
1answer
135 views
Accidentally changed the path of an RSS feed page in Views to refer to a menu link item and cannot access Views menu anymore
I cannot access views from the Structure Menu in Drupal 8 anymore. I accidentally changed the path of an RSS feed page in Views to refer to a menu link item and cannot access the Views menu anymore.
...
0
votes
1answer
30 views
Clicking any administration menu link results in empty overlay screen
I've created a Drupal site which behaves rather strange - whenever I click an item in the administration menu or use a contextual link to edit a page, the half-opaque overlay shows, but no editing ...
0
votes
0answers
18 views
What happened to the Devel variable syntax info info by double clicking on items?
Not long ago I could doubleclick on items like arrays, objects etc in Devel to see the syntax, if I wanted to fetch one value or another for example. That does not work anymore. I have tried using ...
1
vote
1answer
609 views
switch project to dev mode
I faced to problem trying drupal console:
1) In documentation written (https://www.drupal.org/docs/8/theming/twig/debugging-compiled-twig-templates):
drupal site:mode de
But I haven't that command ...
1
vote
1answer
107 views
How to debug a Commerce value in Rules if field is not exposed?
I use Drupal Commerce with Commerce Credits module to let users buy credits which later can be used to submit content.
The module has support for Rules but I can't get a very simple condition to work....
0
votes
0answers
1k views
Getting error after fresh install “Redirects to external URLs are not allowed by default”
Playing around with a new install on localhost.
Error Happens when I click on a submit button, for example installing new modules.
Redirects to external URLs are not allowed by default, use
\...
1
vote
3answers
6k views
Error uploading image
Since I changed my drupal to my backup that it's giving me some errors, but overall it stills working, but today I was about to add a new content and when I try to upload new images it shows me this ...
5
votes
2answers
847 views
Debug plugin discovery
A plugin that I have written is not being discovered.
For eg : https://www.drupal.org/node/2847639
Is there a general suggestion for debugging failing plugin discovery?
0
votes
2answers
218 views
Error :Missing non existing module
In my Drupal 7-configuration, i'm getting this error:
The following module is missing from the file system: <em class="placeholder">imagcache_actions</em>. For information about how to ...
2
votes
1answer
147 views
The connection was reset when creating a new node
On a localhost environment, when I try to create a new node, I get this message:
The connection was reset.
There is some issue with css, cache and/or registry since when I disable the css ...
5
votes
4answers
847 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 ...
2
votes
2answers
671 views
'Unexpected Error' when attempting to edit or delete variant with page manager and panels
I'm using page manager 8.x-1.0-alpha24 with panels.
This issue seems to crop up randomly, but when I attempt to edit variants on certain pages I receive the dreaded 'unexpected error' page. I even ...
1
vote
1answer
352 views
Improve extremely slow 'drupal_process_form' [closed]
I am having problem investigating why our profile edit page is damn slow.
Call Stack
# Time Memory Function Location
1 0.0003 276344 {main}( ) ...\index.php:0
2 1.6889 39666816 ...
1
vote
0answers
440 views
How do I debug hook_mail_alter()?
I need to debug $message on hook_mail_alter(&$message). In D7 it was pretty easy to dpm() on hook_mail_alter(). Now in D8 dpm() doesn't print the nicest output anymore.
I'ld like to see the ...
0
votes
1answer
33 views
Log Message - Page Not Found: includes/database/sqlite/log/login
When I check "Recent Log Messages", I keep finding a large number of "Page Not Found" errors with the message "includes/database/sqlite/log/login".
I've checked the site and the directory does not ...
1
vote
4answers
5k views
How do I turn off notices and warnings?
I am developing a site and am getting a few warning messages that cover the page. I want to deal with them later and turn them off for now so I can concentrate on theming.
I've tried going to Config>>...
1
vote
0answers
322 views
How to debug Drush command with xdebug in vscode? [duplicate]
I reviewed a lot of articles (including Can Xdebug be triggered by Drush commands?) about debugging Drush commands in PHPStorm with settings xdebug.idekey. They suggested export XDEBUG_CONFIG="idekey=...
8
votes
4answers
1k views
How to make use of Devel debugging functions on large or complex objects
I am having trouble making real use of Devel's debugging functions kint() and dpm() in my modules and twig templates. They work fine for primitive variables, flat arrays and such, but if I want to ...
0
votes
0answers
221 views
Debugging a WSOD in Drupal 7 even with error_reporting on in the index.php file
I'm coming into a totally abused and hacked up drupal 7 project. The site is currently working on the production server, but I'm trying to migrate it to a new server. I've replicated as much as I can ...
1
vote
2answers
6k views
Getting “The website encountered an unexpected error. Please try again later.” on each module installation
Drupal 8. Every time I enable a new module via the admin pages, I get a blank page with this error message: "The website encountered an unexpected error. Please try again later."
When I navigate back ...
0
votes
1answer
573 views
How do I debug “unexpected % in php_eval()”?
While testing with PHP 7 a site, which works fine with PHP 5.5, I get this error on some pages:
ParseError : syntax error, unexpected '%' in php_eval() (line 7 of ..\modules\php\php.module(80) : ...
1
vote
2answers
210 views
How do I diagnose a unstable installation on ubuntu 16 server?
I'm deploying a site to a Digital Ocean Ubuntu 16 server. I'm using PHP 5.6, but otherwise using the default versions of the necessary database software. The site functions; however, I frequently have ...
8
votes
1answer
2k views
How to stop twig debug from breaking HTML when inside tags?
Originally this was in a views field rewrite but i have since moved it to
views-view-fields--[view name]--[machine ID].html.twig
And behaviour seems to be the same:
<a href="{{ fields.path....
1
vote
1answer
316 views
What causes my error “Illegal choice in Sorted by element”?
Drupal 7.50 commons
The following error shows dozens per minute when I run drush ws --tail, but there are no reports of users encountering errors or features that are non-operational. Does anyone ...
1
vote
1answer
550 views
Required contexts without a value: node when editing menu
I'm running into this error whenever trying to edit a menu item
Drupal\Component\Plugin\Exception\ContextException: Required contexts
without a value: node. in
Drupal\Core\Plugin\Context\...
0
votes
1answer
32 views
Classes to differentiate between different status messages?
After enabling my custom theme, I noticed that while Drupal adds special classes for different status messages being put out by the drupal_set_message() function, e.g. messages and messages--status. ...
1
vote
0answers
304 views
How to expose field collection's items id or UUID to the front end?
I'm working with the Drupal 8 field collections and currently have setup a custom collection that is an editable widget on the edit pages. I'm trying to target these collection items via their unique ...
3
votes
2answers
128 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 ...
0
votes
1answer
24 views
Disable a Module after Fatal Error without Server/DB access?
I'm working on a Drupal 7 site and recently triggered a fatal error via installation of incompatible modules. Is it possible to disable a module when site is giving fatal error on each page? ...
0
votes
2answers
175 views
How to see Database logs in Devel module
I have installed Devel module in Drupal 7. I am able to see logs of error in each page I visit (when I am logged as admin), but, however, have not been able to see the database logs except in the ...
1
vote
3answers
5k views
Error - External URLs do not have an internal route name [closed]
I can't access to my site because of this error:
UnexpectedValueException: External URLs do not have an internal
route name. in Drupal\Core\Url->getRouteName() (line 554 of
C:\Users\user\...
0
votes
1answer
1k views
How do I use dpm() or kint() to debug a block plugin I created?
I created a custom module which implements a block plugin. The code was generated with Drupal Console. When I try to debug the code within the build function, I get a function not found error.
Why ...
0
votes
1answer
1k views
Error : Only variables should be passed by reference [duplicate]
I get this error Strict warning:
Only variables should be passed by reference in include() (line 20 of
...)
Can anybody see what is wrong here?
<section id="fixed-navbar">
<nav ...
1
vote
0answers
625 views
Drupal 8.2.2 kint output in template not working
We are trying to use the kint() or drump() debugging functions inside twig templates in Drupal 8 but both does not seem to be working even though we have tried all the approces to get them working ...
2
votes
3answers
975 views
How to add the twig debug extension
in /var/aegir/platforms/drupal8-dev/sites/my_site_uri/settings.php
# Additional site configuration settings.
if (is_readable('/var/aegir/platforms/drupal8-dev/sites/my_site_uri/local.settings.php'...
0
votes
1answer
382 views
Server 500 error in a View which is working perfectly outside of the admin area
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 ...
0
votes
2answers
47 views
lost admin toolbar and stock file
I am a total Drupal newbie so need advice.
I installed a new module commerce_shipping_postal_code_weight-7.x-1.x-dev, and tried to activate it. I was then advised a couple of other modules needed ...
0
votes
1answer
333 views
Debugging a custom module with XDebug and PHPUnit [closed]
How can I debug a custom module in Drupal 7 using Xdebug and PHPUnit? That is, I would like to debug and perhaps write some unit tests to eliminate some basic potential problems.
This is a code I ...
2
votes
1answer
1k views
How can I log variables to a txt file?
In Drupal 7 I use devel's drupal_debug() or its alias dd() to log a variable to a drupal_debug.txt in the site's temp directory.
In the Drupal 8 version of devel this function has disappeared. It ...
0
votes
1answer
81 views
Internal Server Error and Machine Readable Names
I have installed a new local site using Drupal 8.1.10 which takes a lot of time whenever I give any command (lets say create a text field) and then sometimes it gives a 'Internal Server Error' after ...