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
2
votes
2answers
2k views

module_load_include not working including inc file

I am trying to make it work, but it seems simply not working in Drupal 6. Maybe this is the issue, it does not work on D6? This is the code: // $file_path = module_load_include('inc', 'MYMODULE.inc',...
2
votes
3answers
1k views

Devel's dpm needs two refreshes to display message from (pre)process

I use Zen and have copy/pasted the STARTERKIT to my foo template. Devel is enabled with the "Rebuild the theme registry on every page load" setting on. In my completely empty template.php I type in ...
2
votes
2answers
2k views

Creating fake (test) data

Is there a module or part of devel module that will auto populate (with fake data) a Content Type a create a dozen or so nodes?
2
votes
1answer
178 views

How to inspect outgoing email content?

There are several modules that send email from my site: Rules, Trigger, User, ... I am looking for a place to set a drupal_set_message() and print out the email contents. Where in the code would be ...
2
votes
1answer
546 views

How to use kpr() or dsm() when i am not logged in

I need to access my login form array using kpr() and dsm() functions but it's not working when I logged out from the site. How to debug and access the login form array as logged out.
2
votes
1answer
2k views

Rules: how to display the value of variables?

I use the Devel module on Drupal 7 to debug some rules of my site but I can't debug without knowing the value of variables I created. In the case, I have a loop where I sum different values and at ...
2
votes
3answers
841 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'...
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 ...
2
votes
3answers
613 views

How can I display the value of a variable inside a condition?

I have created a rule using the Rules UI. My rule is not working, and I need to debug it, displaying the values of my variables inside a condition where I make a comparison. I see within Rules ...
2
votes
2answers
2k views

What is admin_devel module in drupal?

THis module is separate from the devel module that gives ability to dpm() variables etc. What is it?
2
votes
1answer
6k views

How can I disable or hide warnings and errors shown in the backend?

Is there a way to disable or hide warnings and errors shown in the backend? For example when a user creates a node and some error occurs on the live page (image or helper class not found), then there ...
2
votes
1answer
155 views

Where are functions being called from when errors are vague?

I have the following errors which show up randomly when browsing the site. It's hard to reproduce, but also hard to debug. I was able to get it in the error state and have it stay during a reload in ...
2
votes
2answers
1k views

How Can I display values of variables in a “PHP contextual filter code” to debug my code? [duplicate]

I have to use PHP code in contextual filter code in a "Arguments/Contextual Filters" of a view: global $user; $uid=$user->uid; $pid=db_query("select pid from profile where uid='$uid';")->...
2
votes
1answer
362 views

Difference between function names from Drupal Devel

The devel module in drupal allows us to print variable data using functions like: kpr,krumo,dpm,dsm Can anyone please explain how different is each function from the other
2
votes
2answers
1k views

Improving Site Speed and Cache for Authenticated Users

I am building an intranet site. I have the site set up with single sign on via the server authentication module meaning there are no anonymous users. This means large parts of the cache are worthless. ...
2
votes
1answer
661 views

Devel : what kind of information devel_boot, devel_shutdown and php tweak describes?

I have a problem on my website about slow query and many 324 errors. I tried to resolve them but as i'm new in Drupal i have a lot of difficulties to understand some stuff. (The website site i'm ...
2
votes
1answer
382 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 ...
2
votes
2answers
2k 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 ...
2
votes
2answers
654 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 ...
2
votes
2answers
1k views

How do you find out which module is causing a redirect?

I have a Drupal 7 site and have a bunch of custom modules installed. Currently when I hit a specific node/9283 it gets redirected to another page. I'm not sure which module is causing this redirect. I ...
2
votes
1answer
833 views

Generate test data bulkly in drupal 8

I setup a website based on Drupal8,create some content type(with several fields),Now I want to enter some test data in my site. How can I generate test data bulky in drupal8?
2
votes
1answer
3k views

How to debug / log comments when developing a custom module to fire when cron is run

I am about to develop a custom module that will hook into a hook that is triggered when cron runs. Since the module will be activated during a cron run, i am not sure how to go about giving myself ...
2
votes
2answers
956 views

How to debug views_handler_field_node_revision handler?

I believe I have updated some of my modules, then the following debug message pop on the calendar page. Does anyone know what is this message and how to solve it? Debug: 'Handler ...
2
votes
1answer
908 views

Why kpr() shows different content than var_dump()?

In one vital part of code I started to get "Trying to get a property on a non-object" type of errors. So I wanted to investigate it. var_dump($download); die(); Gives: array(3) { [1]=> array(...
2
votes
1answer
632 views

enable dd() for drush - temporary://debug_drupal.txt call fails

If I included calls to dd() from code I run with drush, I see messages like this: WD php: Warning: file_put_contents(temporary://drupal_debug.txt): [warning] failed to open stream: "...
2
votes
3answers
2k views

How to trace PHP errors

I am getting the following errors from Googlebot; I am getting about 5 of them per minute, and I want to find out what is causing them. Type php Date Friday, February 3, 2012 - 08:16 User ...
2
votes
1answer
454 views

How to make Drush rsync @dev @staging exclude some directories?

I am using the following drush commands to synchronize development and test environments. drush rsync @dev @staging drush sql-sync @dev @staging How to setup drush to exclude certain directories (...
2
votes
1answer
4k views

Drupal 7.54 DATE_RFC7231 already defined

After moving my Drupal site to a new host, I got the following error in the error logs. [error] 8707#0: *1 FastCGI sent in stderr: "PHP message: PHP Notice: Constant DATE_RFC7231 already defined ...
2
votes
1answer
311 views

How to backtrace a variable in php template

Currently I am in a .tpl.php file, and have the following piece of code: <?php if ($rows): ?> <div class="view-content"> <?php print $rows; ?> </div> <?php ...
2
votes
1answer
6k views

Calling a field in views-view-fields--view-name.tpl.php -— Error

I am trying to call a field by using the line of code: <?php print $field->handler->view->field['title_1']; ?> But i keep getting this error: I used devel dpm() to look for what was ...
2
votes
1answer
43 views

When I save a user account as an admin, I get logged in as that user

I'm experiencing a strange issue that I'm having a really hard time debugging. When I save a user account (of an authenticated user) as an admin, the account is saved, but when the page reloads I get ...
2
votes
1answer
2k views

How to hide empty region in Omega

It seems that by default all regions are rendered in Omega theme because of the Debug blocks. <aside class="grid-3 region region-sidebar-first" id="region-sidebar-first"> <div class="...
2
votes
1answer
486 views

debug_backtrace and _drupal_error_handler_real with very high mem usage, can I disable?

I was profiling some of my code with xhprof, and I noticed that debug_backtrace() and _drupal_error_handler_real() have a very high memory usage. I set "Error message display" to "None" at admin/...
2
votes
3answers
3k views

How can I have the JS/CSS cache refresh on every page load?

How to clear cache on every page load? I am doing CSS & JS theming and currently having to manually clear cache (using devel module) every time and then reload the page again to see my changes? ...
2
votes
2answers
266 views

Is there a way to log changes to module settings for better long-term administration and debugging? [duplicate]

We run quite a complicated Drupal 6 site with a lot of custom modules which was already migrated from D5. There are a few site administrators and we have had situations where a change in the settings ...
2
votes
2answers
250 views

How can I stop the Devel module from generating blog/forum entries for Anonymous user?

I'm using Devel's generate content feature to generate Blog/Forum entries for a site I'm working on and funny enough, I get to have a blog post by an anonymous user or forum topic by an anonymous user....
2
votes
1answer
3k views

shorten input text size and maxlength with exposed filters

I use Drupal-7.14 and Omega sub theme. I have a view of my content type with exposed filters. When focusing input tags, HTML output is like this: <div class="view-filters"> <form action="/...
2
votes
1answer
143 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 ...
2
votes
2answers
210 views

White screen of death in hook form alter

I have enabled simplenews module in drupal 8 and I am trying to reduce the width of input field from 60 to 30. I am trying to implement form alter hook and have devel module installed. I used dsm($...
2
votes
1answer
915 views

How do I specify the debug_mail_directory for the devel maillog?

In settings.local.php, I have set my local dev environment to use the Devel module's mail logging function: $config['system.mail']['interface']['default'] = 'devel_mail_log'; $config['devel']['...
2
votes
1answer
332 views

After Module updates got “Warning: require_once() ”

I am using Drupal -7 and my website is on cloud(not local host). This is NOT a multi site and using Omegasubtheme. I have just updated workbench Moderation module from 1.3 to 1.4 and have also added ...
2
votes
1answer
33 views

Module not returning echoing or printing variable

I'm writing a module to change a user's shopping cart order ID based on a stored value from their profile, which cannot be edited from the users. In the hook call to commerce_cart_order_id I tried ...
2
votes
1answer
2k views

Undefined function user_load() [closed]

My Drupal 7 installation works fine, except for drush, which does not. $ cd /srv/www/drupal_site $ drush pm-refresh PHP Fatal error: Call to undefined function user_load() in /usr/...
2
votes
1answer
147 views

Cannot save any modules

Whenever I want to enable/disable modules I am given different errors like the one below. These error messages change every time disable/enable a module. "Fatal error: Out of memory (allocated ...
2
votes
1answer
781 views

Can't access module settings (Devel module)

I have a module that's enabled and working, but the configuration options won't show. The module in this case is Devel, which I've used on other sites with no problem. In this site, whenever I click ...
2
votes
0answers
67 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 ...
2
votes
0answers
35 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 ...
2
votes
0answers
251 views

Feeds SQL Import shows data in preview but fails to import

I have a problem on a client site with a Feeds import that shows the correct data within the import preview but does not copy the data across to the assigned field during the import. There are 18 ...
2
votes
2answers
92 views

How can I inspect $element variable in theme function?

I would like to change formatter of Field Collection Table, so that class added to a table row corresponds to a value of field of field collection item. As a first step, I would like to inspect theme ...
2
votes
0answers
33 views

missing format error

Hi Guys I am having a missing format: 1. alert on my web most of the time is when loging out of my web on when I access the front page, this is the log message filter Date Saturday, August 1, 2015 ...

1 2
3
4 5
11