Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [debugging]

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

1
vote
2answers
57 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 ...
1
vote
0answers
13 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 ...
0
votes
0answers
34 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 ...
0
votes
0answers
34 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. ...
0
votes
0answers
50 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 ...
0
votes
0answers
35 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. ...
0
votes
0answers
65 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 ...
1
vote
1answer
66 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 ...
2
votes
1answer
139 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 ...
0
votes
1answer
58 views

Maintenance page being rendered as an entire page load after the main page load

I've noticed that I've got a maintenance page being rendered in its entire HTML markup format after my pages. The site is not in maintenance mode, and this is not intentional behaviour. I'm trying to ...
0
votes
1answer
140 views

Debugging Module Show PHP Errors

I saw in a YouTube video someone had made a configuration where if there was a PHP bug in their module, upon cache rebuild it would show the error underneath the "The Website Encountered an Unexpected ...
0
votes
1answer
27 views

Language switcher block hides for authenticated user

I have a language switcher added to my site. It works fine as long as I'm an unauthenticated user. Logging into site replaces it with: <span data-big-pipe-placeholder-id="callback=Drupal%5Cblock%...
0
votes
0answers
35 views

Error message not converting html tags

In entity browser I tried uploading a file which is not supported. So I got the valid error message. But it does not convert the html tags which are being generated from token. Following is the code ...
0
votes
0answers
317 views

Recoverable fatal error

I am attempting to restore a DRUPAL 5 site in order to upgrade the site. The original site was deleted when the old ISP went out of business without warning and I had to piece together the old site ...
1
vote
1answer
23 views

Is there a way to supress particular messages or a class of messages on the screen?

Is there a way of suppressing a particular class of messages from being displayed on the screen, such as the one displayed below? Deprecated function: Methods with the same name as their class ...
0
votes
0answers
28 views

Can't access the Status Report page

I've updated my LOCAL site with composer, updated the database but can't access the Status Report page (site encountered an unexpected error). I looked at the recent log messages and saw this error: ...
0
votes
0answers
38 views

www.homepage.com/sites/ loads a 403 error and we want to redirect to 'page not found'

We are trying to tighten up our homepage drupal 7 installation and our SEO partner informed us that some subdirectories are showing up in our stats where they shouldn't be. At present, homepage.com/...
0
votes
0answers
181 views

AJAX HTTP error HTTP Result Code: 200

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. {.....} getting above error while adding taxonomy term and setting condition for the rule using rules module.
1
vote
1answer
258 views

500 error without any error log entry

Migrated a Drupal 8 site to another server running apache2 PHP 5.5.9 (should be supported). Apache returns 500 when index.php requested, but no errors are logged anywhere. I tested by forcing an ...
0
votes
2answers
34 views

Receiving Error message on every attempt to add or remove content. Is this normal?

New to drupal & collaborating on a project. Error message reads "Error ; The website encountered an unexpected error. Please try again later." I've been getting that error message for 4 days in a ...
0
votes
1answer
333 views

showing errors even though display_errors is off

I want to hide all error messages to the users. I did all the three steps below Set display_errors = off and error_reporting = 32767 in php.ini Made sure this config $config['system.logging']['...
0
votes
1answer
27 views

Fatal error: Cannot redeclare casa_views_post_execute

I understand this to be two declarations of the same function, which is not allowed. But how to fix this? Everything was fine until I started to enable the MailChimp module, then the backend has this ...
0
votes
0answers
35 views

Option to display/hide block dependent on content type gone

I have a drupal 8 site, on which I have several blocks that I want to hide on pages of a several content type. I have done this before. Usually, I go to structure > block layout, select edit on the ...
0
votes
0answers
41 views

Drupal 8 & intellij issues with phpunit-xdebug

I am trying to run phpunit tests in Drupal 8.5.2. PHP 7.1.1, windows 10. Xdebug. The project is built with composer and includes acquia/lightning": "~3.1.0. "phpunit/phpunit": "^4.8.36" The tests ...
1
vote
1answer
47 views

How to debug an empty cache_page table

I have a bunch of sites built off the same profile, and recently noticed the pages aren't being cached. I spent some time doing the usual: looking for drupal_set_message calls, disabling all the ...
0
votes
1answer
27 views

Can't load font woff

I have relatively simple issue but I can't fix it myself. My log is full warning with same message: page not found http://mywebsite.com/sites/all/themes/bigwig/font/entypo-icon-font.woff I have ...
0
votes
1answer
33 views

D8 - Custom EntityType - Error when translatable

When I save my Custom Entity Type I get an error. I tried several different things. The code looks valid to me. error: The website encountered an unexpected error. Please try again later. Error: ...
1
vote
2answers
187 views

How to show kint debug info from a module on a page?

In D8 I would like to display an array in the message part of a page. I did several things but could not get it work. What to do? I installed the devel and kint modules. I currently have changed ...
3
votes
2answers
965 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 ...
1
vote
0answers
22 views

Page not found errors for images

The site becomes painfully slow at times and when I look into "Recent Log Mesaages" logs such as this is frequently found. The Location shows: http://example.com/sites/default/files/styles/featured/...
0
votes
1answer
281 views

Creating a simple Drupal 8 custom service - argument should be an instance of a class, recognised as an array

I'm kind of new to Drupal 8 development and object-oriented PHP in general. I've been trying to make a simple custom block module, which includes a service with simple dependency injection. However, I ...
0
votes
0answers
589 views

The website encountered an unexpected error. Please try again later. Bootstrap

I got this error "The website encountered an unexpected error. Please try again later." and was able to remove it by rewriting some of my .yml files but it came back again. Not sure on how to remove.
0
votes
1answer
87 views

Drupal Commons, can't break-contact error

I am using Drupal Commons (7.x-3.46).. Whenever trying to "break contact" of a trusted-contacts, I get an error: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. ...
3
votes
3answers
2k 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 ...
-1
votes
1answer
287 views

This page is not working

When I visit my site, I get an error: This page isn’t working my---site.com is currently unable to handle this request. HTTP ERROR 500 I have taken the below steps but no luck. In shared ...
3
votes
1answer
851 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 ...
2
votes
0answers
26 views

how to create try catch in drupal 8 [duplicate]

I would like to create a custom message when user did unexpected error it should show this message Invalid parameter please enter correct values . It should not show this message. The website ...
-1
votes
0answers
26 views

Theming the “unexpected error” page [duplicate]

When I have a twig syntax error or a database error after installing a new module or from restoring from a backup I get a simple white page with the text "The website encountered an unexpected error. ...
0
votes
1answer
52 views

Error when running database update: “DatabaseSchemaObjectExistsException: Cannot add field redirect.status: field already exists.”

I'm getting the following error when attempting to run a database update: Update #7101 Failed: DatabaseSchemaObjectExistsException: Cannot add field redirect.status: field already exists. in ...
0
votes
1answer
48 views

error message when installing drupal 8

When I was installing Drupal 8 (Macos, nginx, php7.0, mysql5.6), the following error occurred, Can someone help me? An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. ...
1
vote
1answer
435 views

what when displaying a variable with kint crashes?

I am trying to find the variable name for the content link in a view. {{ kint(content) }} makes the page crash, probably because the variable is too big. The same is true for the following code. ...
0
votes
0answers
41 views

Why are xdebug breakpoints in my theme.theme being ignored?

I can stop execution at a breakpoint in index.php and step through the Drupal code - so would assume that Xdebug is set up OK - but never encounter the breakpoints I've set in MYTHEME.theme On ...
0
votes
1answer
582 views

dump $variables in theme_preprocess functions

In theme_preprocess functions (e.g. theme_preprocess_block, theme_preprocess_menu, etc) there is the $variables argument. In Drupal 7 I could look at this variable using devel module and typing dpm($...
0
votes
1answer
41 views

captcha.module error

I've just installed recaptcha module and it works fine but I get this error only at the sign up screen (registration screen). Does anyone know what can I do to fix it?? The error: Notice: Undefined ...
0
votes
0answers
178 views

Access taxonomy fields on page.html.twig [duplicate]

I have added a header image field to most of my entities of my website so that the header image can be overwritten if needed. On any node, my code in my page.html.twig file works perfectly: {% if ...
0
votes
1answer
31 views

Devel Krumo outputting all variables in a list format and not in an expandable clickable list

When I do a dpm() on an array my devel krumo output is showing a list of the variables. Previously it was in a clickable expanding list where I can hide and show the child arrays. What settings did I ...
-1
votes
1answer
45 views

How to debug invalid plugins derived by the GraphQL module?

I'm currently using the GraphQL module in combination with the Brightcove module. When I visit /graphql/explorer, all I'm getting is a totally white screen. When I visit /graphql/voyager, I end up ...
1
vote
4answers
102 views

How to find which module is causing PHP warning

In the Recent log messages I get this message repeated many times: Warning: array_flip(): Can only flip STRING and INTEGER values! i DrupalDefaultEntityController->cacheGet() (rad 388 av C:\...
1
vote
1answer
148 views

Problem in deploying Drupal 8 application

I am trying to deploy a Drupal 8 application to another folder from development. Using PGSQL as database server. I have database named xyz. I am copying that database to another one named abc. The ...
1
vote
1answer
83 views

What's wrong with this simple debugging code?

Spend whole day trying to make working simple debugging code for Tweme theme (using D8). function tweme_preprocess_node(&$variables) { $node = $variables['elements']['#node']; kint($node)...