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
0answers
25 views

Commerce File - Error

I got the following Error when a licensed commerce file should be shown in the "Files" tab of the user account: Notice: Undefined offset: 0 in commerce_file_handler_field_download_limit->pre_render(...
1
vote
2answers
34 views

How to output $variables without loading everything?

I'm trying to debug a drupal 7 site and print_r() the $variables variable, but its HUGE and crashes certain pages when there is alot of data in it. Is there a way to only output the first level of the ...
2
votes
0answers
256 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 ...
0
votes
1answer
18 views

How do I view the string pulled from feeds image importer?

I am importing images from a feed using xPath parser. I think that I have the correct attribute value, media:content@url, but I am getting a Unable to handle the provided embed string or URL. error. ...
0
votes
1answer
682 views

Devel dpq() not working?

I am trying to print the sql generated from the view but its not working. Below is the error message I am getting:- Fatal error: Call to a member function arguments() on a non-object in /var/www/...
0
votes
1answer
87 views

8 - Node::load is generating an object with circular reference which is crashing kint() and var_export()

I have a content type with a Taxonomy term which has fields. When I try and load a node (or possibly nodes) of this type I get unexpected results. While debugging with kint() and var_export() I get ...
1
vote
1answer
639 views

How to set kint() to be closed by default?

I find that when expanding Kint widgets, if the object is sufficiently large, the loading time can be quite slow. It appears, when you expand the root level, it also expands child objects. I would ...
-1
votes
3answers
389 views

Where to put dpm (Devel) to see comment elements?

Where to put dpm or dsm (Devel) to see comment elements?
0
votes
1answer
103 views

Simple debug results in internal server error

All I want to do is print a view out so I can check the variables and see the structure of what's being created but it results in an internal server error. I'm using Acquia Dev Desktop. I've checked ...
0
votes
3answers
4k views

How can I print out large variables in hook_entity_presave for debugging?

I'm trying to print out the $entity variable im hook_entity_presave because I want to see all of the properties and their values at the time of saving. The problem is that every way I have tried to ...
2
votes
3answers
633 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 ...
1
vote
2answers
2k views

How to debug or explore an unknown object or array too big for Drupal's debug()?

I'm trying to see what variables I have available in a $vars object in a Views hook. Unfortunately, like many Drupal object, this one is huge and attempting to output it using the Drupal debug() ...
1
vote
1answer
26 views

Can we configure Devel module to pick up images for the image field of a content type only from a specific directory containing images?

A Yes or No question. Using Drupal 7.43. Devel module generates polycolor image content of a content-type which has an image field. But I need only a few specific images on my contents of that content ...
1
vote
1answer
264 views

How do I get kint() to include the variable name in output?

My understanding that normally kint will display the variable name in the output, e.g. $abc. But in my code kint($abc) never outputs the $abc label so when I have multiple kints it becomes very ...
5
votes
1answer
703 views

Copy path to variable in array using Kint

In D7 using dmp() with Krumo in produced output like this: Double clicking on a variable value, in this case "foobar" shows the path through the array to that value (the highlighted text in the image ...
1
vote
1answer
34 views

debugging an array while creating custom rule

I am trying debug a custom rule I am creating. In my helper function I am calling an array I want to work with. I want to dpm the contents of the array so that I can see what is available, but it is ...
0
votes
1answer
66 views

How to debug custom node type

I am following this guide to build a custom node type in Drupal 7: http://www.sitepoint.com/creating-a-new-drupal-node-type/ Unfortunately, my code is not working and drupal is not outputting any ...
1
vote
2answers
94 views

Error after installing and enabling “Rooms-Drupal Booking for Hotels, B&B and Vacations” and dependent modules [closed]

After installing and enabling "Rooms-Drupal Booking for Hotels, B&B and Vacations" and dependent modules, I get this error when I try to go to the content menu. Does anybody have anything to fix ...
1
vote
3answers
1k views

Solve “Cron run failed” without Watchdog

Some years ago i wanted to turn off watchdog because it's memory and db consumption, but today i need info about why my cron isn't running because need to use Search module from now? Trying to run ...
7
votes
2answers
445 views

Drupal Settings for PHPStorm

I want to try to work with PHPStorm Debug. I already installed debug on my Mac and changed the php.ini File. Furthermore, I installed the Debug Helper for Chrome and created a Projekt on PHPStorm. ...
1
vote
2answers
315 views

Fixing bad node that makes search not index, but completes cron

Upon updating to the latest version of Drupal 7, the following errors presented themselves in the site: Warning: Creating default object from empty value in node_build_content() (line 1398 of /var/...
2
votes
2answers
758 views

How to get a backtrace in Drupal, without problems like out-of-memory when huge objects are in the trace?

I often have problems with the standard backtracing functions when working with Drupal: debug_print_backtrace(); often seems to get lost between pages and never prints, Drupal's objects and classes ...
3
votes
1answer
218 views

Why does Rules event 'After updating existing content' not result in 'Create a new comment'?

I've used Create a new entity for the Rules event After updating existing content, but nothing happens. Is it a bug? Update: Here is an export of my rule: { "rules_update_order" : { "LABEL" : "...
0
votes
1answer
24 views

How to debug closed connection error

I run a panopoly project currently with many many addidtional modules. How to debug a closed-connection-error while uploading an image?
0
votes
2answers
275 views

Why does my code for checking field permissions allow users to register with the same email address?

Based on the Examples module, I tried to set up permissions on some user account fields so that only admins can read them. However, the code below somehow allows users to register with the same email ...
2
votes
1answer
992 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
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';")->...
0
votes
1answer
127 views

dpm in submit handler not working?

I have a very interesting problem. I have 2 dev machines (both mac, running XAMPP). In my project I have a submit handler for a custom entity form. When I try to dpm() (or kpr, or dsm, ...) the ...
1
vote
1answer
85 views

How to avoid missing status for Workflow access module permission just after node creation?

I am using Workflow 7.x-2.8 to manage peer-reviewing publication. When an authenticated user (an author) creates a post, he can choose a first workflow state transition from creation (by default) to ...
0
votes
1answer
139 views

How to debug a server reset or WSOD?

We have recently observed that we can put Drupal in an inconsistent state where it responds with a server reset or WSOD, where no data is sent. This by simply having some faulty configuration (See CCK ...
0
votes
1answer
46 views

CCK field migration reproducibly results in server error on node display

I am trying to migrate my CCK types to Fields using CCK module in D7, using content_migrate, following the documentation. After migrating all fields of a certain content types, I got a server reset ...
0
votes
1answer
76 views

How to get devel content generate module to only include one image per dummy content creation

I'm using devel generate and it randomly adds multiple images to articles. I can limit the number of words in the title. Is there an option to limit number of images or text lenght?
0
votes
1answer
694 views

Kint breaks in template and doesn't allow me to view anything

In my template I am trying to view the contents of Childen in a form template. <form{{ attributes }}> {{ kint(children) }} </form> However, the result I get is a useless broken kint ...
1
vote
1answer
38 views

Base theme no longer recognized

I recently inherited a Drupal 7 (7.39) site using an old version of Omega 4 (beta7) and a custom subtheme. All was well until this morning, when cron got stuck. It unstuck itself before I could start ...
5
votes
3answers
17k views

In Drupal 7 how do you output array objects to be view able in watchdog error reports?

For some reason I couldn't use devel to debug output object arrays. Is there a way to output the array data to watchdog error reporting? This would also solve the issue of having to install or enable ...
-1
votes
2answers
626 views

Fatal error: Cannot redeclare

my website show a fatal error about 'cannot redeclare' [1]. In first moment I though that It was a concrete problem and I deleted some part of code though it was repeated. But the problem is yet, but ...
-1
votes
1answer
94 views

Can't get variables [closed]

I'm trying to get variables to use them in my module but I can' get them. I try print_r($variables) and get "Undefined variable: variables in include_once().." The same happens if I try to get $...
0
votes
2answers
326 views

hook_node_access($node, $op, $account) not working

I'm using drupal 7.41 module: Devel I created module_template module. function module_template_node_access($node, $op, $account) { kpr($op); kpr($account); } But when I view or edit node not ...
2
votes
2answers
9k views

dump(), kint() & print_r() are not working in .theme file

I've used drupal 8 with devel module. I want to change some values dynamically in views fields. So i tried to use theme_preprocess_views_view_fields(). When i tried to print variables using print_r(), ...
-1
votes
2answers
1k views

How to get PHP path of stdClass object from dump of dpm()? [closed]

I need to print the below value [seventhly] as per the attachment, so please advice. If you need any detail please ask me.
1
vote
1answer
559 views

Can the Devel Generate module generate content for all possible permutations and combinations?

I love the Devel Generate module as it helps me to create test content very quickly. Random content that the module generates is sufficient most of the times. But at times I would like to have ...
1
vote
1answer
19 views

Suppressing another module's warnings [closed]

Is it possible to suppress another module's warnings? My module calls another causing a warning to appear.
0
votes
2answers
386 views

How do I access variables displayed in devel?

Using devel I'm able to retrieve the names of certain variables and how to access them. For example I might want to use the book menu name. Devel has it listed as so $...->book['menu_name'] But ...
0
votes
1answer
86 views

How to debug rules that are not being run?

I have few rules bound to the Event: Completing the checkout process After completing the checkout process these rules should run - but they do not work... I am using Devel module to debug the ...
0
votes
1answer
120 views

How to identify and target a form element?

A similar question has been asked before: How do you identify a form element? I am using the Devel module and dpm($form) outputs the object nicely: But I can't set/change the default value of a ...
1
vote
0answers
26 views

Doing a debug_backtrace() - White Screen when putting it in drupal_set_message() [duplicate]

I currently have the following code in my drupal_set_message() 1778 function drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE) { 1779 if ($message) { 1780 if ($type == 'error'...
-1
votes
3answers
279 views

How to find the culprit module that's causing all my views not to display anymore?

The Views on my site were working perfectly until I updated a bunch of modules and now I get these errors and the views don't display: Warning: include(/home/x/public_html/.tpl.php): failed to open ...
0
votes
1answer
24 views

Devel Module bogus output

I need help with the devel module. I'm outputting my objects/variables with dpm($variables); into my template.php and I get the same output on every page. It's pulling one of my views and showing it ...
1
vote
2answers
907 views

Devel's dsm & dpm not working

I am trying to print out the $view object using devel and dsm. My function in function.php is function my_theme_views_pre_render(&$view) { if ($view->name == 'my-view') { dsm('$view');...
1
vote
1answer
356 views

Debugging your code under SimpleTest when the behavior is different

I'm dealing with a weird problem where a few of my tests are dying from exceptions when run inside of SimpleTest, but I'm unable to reproduce the problem outside of the SimpleTest environment. In ...

1
3 4
5
6 7
11