Questions tagged [debugging]

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

0
votes
0answers
16 views

Appointment scheduling module configuration and documentation [on hold]

I have installed the module successfully, but in fact i have discovering issues to configure the usage, I have an ENTITY/FIELD DEFINITIONS error even after i have updated entities from drush it shows ...
0
votes
1answer
25 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 ...
0
votes
0answers
26 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. ...
0
votes
0answers
20 views

766 security update database schema errors

After updating to 7.66 and running update.php i get an error: Class name must be a valid object or a string in /home/breastcancertiss/public_html/includes/common.inc on line 8066 I have 6 schema ...
0
votes
0answers
22 views

Notice: Undefined property: stdClass::$domain in locale_language_url_rewrite_url()

I have a bilingual website set as two different subdomains (fr.domain.com and en.domain.com) and a custom module for content-aware language switcher link in the main menu (i.e. if I'm on fr.domain.com/...
1
vote
1answer
134 views

How do I debug with Xdebug in Visual Studio Code?

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\...
0
votes
0answers
23 views

Print out `data` as a string from Drupal_http_request response

I use drupal_http_response to make a request to an external API, and then I attempt to print the response using watchdog: $response = drupal_http_response($url, $options); watchdog('My Response:', '&...
0
votes
1answer
48 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 ...
0
votes
0answers
21 views

How to debug a possible permissions issue when two entity forms using the same field show different behavior

I am using Open Social in a Drupal 8 website, together with the module Hashtags. The Hashtag module is a text format filter, which converts hashtags like #foo into a link to a term which it creates ...
2
votes
1answer
52 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 ...
0
votes
0answers
63 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\...
1
vote
2answers
63 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
14 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
122 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
56 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
170 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
36 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
113 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
152 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
242 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 ...
1
vote
2answers
108 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
338 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
29 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
40 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 ...
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
34 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
54 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/...
1
vote
1answer
483 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
67 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
592 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
29 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 ...
1
vote
1answer
78 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
39 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
45 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: ...
2
votes
2answers
482 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
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 ...
1
vote
0answers
26 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
426 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
1answer
91 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. ...
2
votes
3answers
4k 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
404 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
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 ...
2
votes
0answers
32 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 ...
0
votes
1answer
66 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
61 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
820 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
1answer
968 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
44 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
220 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
42 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 ...