2022 Developer Survey is open! Take survey.

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
1 vote
1 answer
25 views

Search is very slow for certain roles

I'm a bit lost here. I have a strange problem and don't know where to begin. I use the core search function on a website I build. When I am logged in as administrator this search function is working ...
user avatar
  • 894
1 vote
1 answer
67 views

How to find module that is updating my node after insert

When trying to create a new book i get the following message: Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '53' for key 'PRIMARY': ...
user avatar
  • 894
0 votes
2 answers
47 views

Enable error logging from settings.php

I am facing a The website encountered an unexpected error. error while setting up the site. Most of the documentation I found online suggest to enable logging in the setting.php file. I added this ...
user avatar
-1 votes
1 answer
47 views

How do I debug Drupal\Component\PhpStorage\FileStorage::createDirectory()?

On my site, I am getting this warning. Alert: User warning: mkdir(): Permission Denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() (line 123 of core/lib/Drupal/Component/...
user avatar
0 votes
1 answer
37 views

Devel Generate keeps generating files after uninstalling it

Some time ago I removed Devel from my site because it is in production now. However, when I look at the Content list I still see files being generated, like generateImage_J4d7CV.png and nq3cv2oMx9.txt ...
user avatar
  • 227
1 vote
1 answer
119 views

How do I get the un-truncated error message from dblog?

The "Recent log messages" is very handy to track down errors on sites. While this works great for errors in PHP code, it is often unhelpful for errors in Twig code. E.g. I've this error ...
user avatar
  • 4,866
0 votes
1 answer
26 views

Disable theme debugging html comments in particular view?

we are running commerce site, still tweaking some bits, so we have still twig debug set to true, but site is already online.. we have XML feed for exporting commerce products to couple of price ...
user avatar
-1 votes
1 answer
27 views

Webform 6.1.0 help text not showing

I updated my webform Module from 5.3.0 to 6.1.0, I have one the Following Error: the help text isn't displaying its content on any form on my site (Example of help icon in the shared image) It should ...
user avatar
  • 7
0 votes
1 answer
270 views

Webform 5.3 to 6.1.0 , Error : Call to undefined method Drupal\webform\Routing\WebformUncacheableResponse::addCacheableDependency() [closed]

I updated the webform module from 5.3.0 to the latest version (6.1.0) and then when I click submit on one of my forms, I receive this ERROR: Error: Call to undefined method Drupal\webform\Routing\...
user avatar
  • 7
0 votes
1 answer
322 views

How can I debug a Twig error that occurs after migrating from Drupal 8.9 to Drupal 9+

I am trying migrate my Drupal 8.9 site to Drupal 9+ and I am stuck with an error its cause I am not able to hunt down. On almost every page I get the following PHP exception: Twig\Error\RuntimeError: ...
user avatar
  • 1,998
3 votes
1 answer
123 views

Details wanted for "Mismatched entity and/or field definitions" message on custom field

I have developed a custom Drupal field. All works fine. We are already using the field in production for a year. But the status report for exactly this field says: Mismatched entity and/or field ...
user avatar
0 votes
0 answers
80 views

How to find the cause of "Uncaught PHP Exception"

When I go to any page, the following error appears in the log: [proxy_fcgi:error] [pid 20333] [client 172.18.0.6:52608] AH01071: Got error 'PHP message: Uncaught PHP Exception Symfony\\Component\\...
user avatar
0 votes
1 answer
57 views

How do I debug overridden twig templates?

How do I debug the template overrides. The debugger stops on page.html.twig but doesn't stop on sub templates such as web/themes/custom/localtheme/templates/field--paragraph--field-pbcrossfade-image--...
user avatar
  • 1,319
-1 votes
1 answer
132 views

After upgrade to Drupal 9.2: Call to undefined function escapeshellcmd(). Why?

When I want to submit a form (webform module) I get get the followng error: Call to undefined function Drupal\Core\Mail\Plugin\Mail\escapeshellcmd() in Drupal\Core\Mail\Plugin\Mail\PhpMail::...
user avatar
0 votes
0 answers
25 views

Permissions suddenly changed

I've inherited a drupal 7.6 site with a broken css (styles were not loading). Here's what I've done so far: -set sites/default/files, tmp and cache folder to 777. -flushed all caches When this didn't ...
user avatar
  • 1
-2 votes
1 answer
497 views

The website encountered an unexpected error. Please try again later. unable to debug

I have just moved a Drupal 7 site to a new server. The website loads ok but if I log in as an admin person and click on any of the admin menu options I get the error The website encountered an ...
user avatar
1 vote
2 answers
35 views

Strange Page not Found, Permissions, Clear cache

On my D7.80 I have developed a custom module: function wrong_answer_menu() { dd('it entered in hook menu'); $items['wrong-answer/%id'] = array( 'title' => t('Wrong Answer Dashboard'), ...
user avatar
  • 41
1 vote
1 answer
513 views

Attempting to merge in an array of items into Twig classes

I have a Twig template where I'd like to merge in an array of items as classes. So far I have this code: {% set classes = [ 'media', 'media--type-' ~ media.bundle()|clean_class, not media....
user avatar
4 votes
1 answer
402 views

How to I trigger Xdebug 3.x with Drush in PHPStorm

Has anyone has success with getting CLI debugging (drush) working with Xdebug 3.x? There are several obsolete posts here... but all obsolete with the new version of Xdebug. Expected behavior After ...
user avatar
  • 937
0 votes
0 answers
68 views

How can I print debug info in custom module?

I need to edit parts of a custom module that I didn't make, and I don't really have much experience editing/coding custom modules. How do I print debug info in functions in a custom module? In the ...
user avatar
  • 313
1 vote
0 answers
140 views

Drupal + XDebug + VSCode = can't break on PHP notice or warning

Using Drupal (8.9), PHP (7.2.34) with xdebug, and VSCode (1.50.1) with PHP Debug (1.13.0), the debugger will no longer break on PHP notices and warnings, even if those option checkboxes are set. The ...
user avatar
1 vote
1 answer
150 views

Debugging node/route access

I want to set a breakpoint in xdebug to debug an interesting issue the site is having regarding user access to certain nodes. My question is where do I do that in D8? Where, specifically, is the D8 ...
user avatar
0 votes
1 answer
709 views

Debugging Ajax Callback

Goal: Print/dump $formState values to debug I am altering a form and the functionality works: $form['elements']['location']['deparment']['#ajax'] = [ 'callback' => 'myAjaxCallback', 'event' =&...
user avatar
1 vote
1 answer
443 views

twig dump() creates WSOD error

this is my first Drupal installation (I'm a symfony dev) and I've spent several hours trying to get dump() working. However it just causes a WSOD. Maybe related: I'm unable to install kint, there's ...
user avatar
3 votes
1 answer
616 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 ...
user avatar
  • 183
0 votes
1 answer
240 views

The "Modules" page doesn't load

I am running a setup on Ubuntu and WSL (Windows Subsystem for Linux) with Nginx and PHP7.4. Drupal 8 and Drupal 9 fresh installations load every page with no problem, except the page on /admin/...
user avatar
0 votes
0 answers
147 views

how to print node object in drupal 8 [duplicate]

in drupal 7 we could use kpr() from devel module or php print_r() and var_dump() functions to print $node object in node.tpl file or hook preprocess node in purpose of debugging and finding a field or ...
user avatar
  • 101
-3 votes
2 answers
851 views

How can I prevent memory size exhaustion when dumping variables in Twig? [duplicate]

hello everyone i have a problem with kint , in my twig page i want to listing all variables contains int 'content' variable to make some logic on it , but the page can't loaded because the big pip ...
user avatar
4 votes
1 answer
513 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 ...
user avatar
1 vote
0 answers
367 views

Render HTML in Drupal 8 error messages

I'm working with Twig templates, and often see messages like this in the browser when I make a mistake: The website encountered an unexpected error. Please try again later.</br></br><...
user avatar
1 vote
0 answers
443 views

PHP Fatal error: Cannot redeclare twig_without() [closed]

Getting the below error after I tried to install new modules to D8. [error] 32411#32411: *31 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot redeclare twig_without() (previously ...
user avatar
3 votes
1 answer
142 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) ...
user avatar
  • 4,866
1 vote
1 answer
155 views

Why can't I debug twig templates with intellij idea?

I can't get intellij idea to break on twig files. It is breaking on theme and module files fine. This means that xdebug must be setup correctly. I don't believe that it is caching as I've deleted the ...
user avatar
  • 1,319
4 votes
0 answers
253 views

Does the structure of the module's src folder matter? [closed]

I've read about the Basic Structure guide to building a Drupal 8 module. It's great that it outlines the basic files needed to get a module up and running. Where it falls short is the contents of the ...
user avatar
  • 1,134
0 votes
1 answer
97 views

How to debug why some content is not migrated from D7 to D8?

I am using migrate_plus to migrate from D7 to D8 and so far it has been a fairly smooth process. I have a particular content type that has 10 nodes in D7 but will only migrate one of them to D8. ...
user avatar
  • 777
0 votes
0 answers
91 views

Is there a dd() like variable printer that can be used inside a preprocess?

Many times when I start a hook_preprocess_hook, I start by printing the $vars object. I can do this by dpm()'ing, dsm()'ing, kint()'ing etc. The problem is that all of these functions print $vars in ...
user avatar
  • 195
0 votes
1 answer
300 views

Extending a base template file such as field.html.twig renders no results?

So I have a custom content entity that has the typical attributes. Name, Author, Creation Date, ect. In the 'view' tab of this content entity, it displays said name, author, ect. When I hover over ...
user avatar
  • 367
0 votes
0 answers
606 views

Why is my custom twig template not being selected by Drupal?

So I have a custom module that has boilerplate template code inside it. No problem there. So I following the Drupal Docs which says to create a service.yml file and turn debug on and caches off. Done. ...
user avatar
  • 367
0 votes
1 answer
1k views

How do I debug with Xdebug in Visual Studio Code? [closed]

When I try to debug Drupal 8 (8.6.11) using Xdebug in VS Code (I'm on Win 10 but I doubt it is relevant in this case) I get the following error: Exception has occurred. Dotenv\Exception\...
user avatar
  • 37
1 vote
1 answer
468 views

How do I debug incorrect favicon showing on the front page in a custom theme?

I'm working on a Drupal 8 site with a custom theme that I didn't code. The site is using the metatag: favicons module to control the favicons. The favicon seem to work correct on all except the home ...
user avatar
  • 1,172
2 votes
1 answer
678 views

How to properly attach Google Maps Api to Drupal behaviors in Drupal 7?

So, I've posted on this elsewhere and I seem to either get half answers but they've gotten me closer to a solution but not over the finish line. I'm trying to implement a custom Google Maps ...
user avatar
  • 1,172
0 votes
0 answers
235 views

AttributeArray fails to implode #allowed_tags

I started working on existing project and right from beginning, it displayed tons of alerts in specific pages. This is what Drupal outputs: Notice: Array to string conversion in Drupal\Core\Template\...
user avatar
  • 101
1 vote
2 answers
234 views

Manipulate a render array in hook_node_view

I'm wanting to modify the contents of some fields at display time so looked at hook_node_view(), however, the $build array is not what I'm expecting, if I dump it with var_dump it is thousands of ...
user avatar
1 vote
0 answers
23 views

Left to right mark added to field name

Using Drupal's admin I added to an existing content type a new text field with the machine name field_note. When fetching the field in my code I want to check if $field_name == 'field_note' but it ...
user avatar
  • 13
0 votes
0 answers
721 views

Unable to determine class for field type during upgrade

I'm getting the following error when I am updating my site's core and contrib modules. I'm at a loss as to how I would go about finding the issue. I've gone to views.views.inc line 181 and looked ...
user avatar
1 vote
0 answers
284 views

Debugging strange memory overflows on Pantheon

We have a Drupal Commerce site on D8.6.7 running on Pantheon Performance Small servers. We do a bit of side processing besides normal e-commerce stuff like syncing up data, collecting emails, etc. ...
user avatar
  • 216
0 votes
0 answers
1k views

How to turn off Twig debugging for a views feed?

I am trying to build a calendar rss feed from views. The rss.xml is being generated, but it doesn't appear to be accepted as a calendar rss on local systems. When I look at the source, I see it's ...
user avatar
  • 3,839
0 votes
0 answers
37 views

How to trace the raw data of each element in a web page we want to check?

I'm a beginner of Drupal8, and I've encountered lots of difficulties till now. One of the biggest one is that when I enable the Theme Debug, I always confused about where the selected part comes from. ...
user avatar
  • 23
1 vote
0 answers
870 views

Throwing an AccessDeniedHttpException() in an event causes a "max nesting level" error

I am debugging an event subscriber that checks if a user has access based on certain conditions. If they don't have access, then I am doing: throw new AccessDeniedHttpException(); However, this was ...
user avatar
  • 26.3k
1 vote
1 answer
993 views

Translation: File upload error. Could not move uploaded file

I would like to import an translation file *.po. When I import it, I become the error: "For security reasons, your upload has been renamed to bootstrap-all.de_.po." and "Error message File upload ...
user avatar

1
2 3 4 5
12