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
0
votes
1answer
93 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
610 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
1k 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
24 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
263 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
681 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
64 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
93 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
422 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
298 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/...
1
vote
2answers
658 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
215 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
253 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
895 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
120 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
128 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
75 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?
1
vote
1answer
669 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
37 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
15k 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
601 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
93 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
286 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 ...
1
vote
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
546 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
377 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
114 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
25 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
263 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
870 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
345 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 ...
3
votes
2answers
1k views

How to debug Batch API more efficiently?

I've some issues with Feeds importing (I don't want to focus on particular case) and I'd like to find the way of able to debug Batch API processing more efficiently. Given the fact of complexity of ...
0
votes
2answers
419 views

How to trace an Error: PDOException: SQLSTATE[23000]:

I'm trying to trace this error which is shown when I save a new basic page node. It seems to me that I am trying to save a duplicated title value in field_data_title_field, but it doesn't make any ...
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 ...
6
votes
3answers
524 views

How to get drush to work with xdebug — may have recently broken

I've been using drush with xdebug for years. It looks like it broke in the last two weeks, possibly due to modifications made to the core "drush" script (Split 'drush' script into finder, wrapper and ...
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
1answer
831 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?
1
vote
2answers
650 views

how to print db_select result using watchdog?

I'm trying to debug below code: $perishables = db_select('userpoints_txn', 'up_txn') ->fields('up_txn', array('txn_id', 'uid', 'points', 'remainder', 'time_stamp', 'tid', 'operation', '...
0
votes
1answer
33 views

Can't uninstall “Translation Language capabilities (tmgmt_language_combination)” dissabled ALL translation modules that might be dependant

I've tried drush, I disabled i18, ALL fields, multilingual, entity translation, l10n, everything about translation is disabled. How can I completely get rid of this module, it's caused nothing but ...

1
3 4
5
6 7
11