Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After the last update on 04/11/2016 the dd function is printing blank on dd() when we do it with migrate tools
I don't know why, but I go back the version and it works again. Any idea about it?
Comment | File | Size | Author |
---|---|---|---|
#8 | dd_function_is_not-2705897-8.patch | 2.54 KB | willzyx |
|
Comments
Comment #2
guilopes CreditAttribution: guilopes commentedComment #3
willzyx CreditAttribution: willzyx commentedRecently dd() was modified in a couple of issues
#2559061: Fatal error: Cannot redeclare dd() - if the problem is related with this change make sure that there are not conflicts with other global function
#2191395: Make dpm() and friends pluggable (with Krumo, Kint, Ladybug etc) - we have introduced a pluggable dumper system which have replaced the old dd() implementation. Could be that this change causes the problem but I cannot reproduce it on my environment
@guilopes please can you indicate your devel configuration and the steps to reproduce the issue on a clean installation?
Comment #4
dom18fr CreditAttribution: dom18fr commentedI experience the same trying to use dd function in a console context using drush. In such case, DevelDumperManager::hasAccessToDevelInformation() return false as it fail to retrieve any authenticated user. May be this can be solved by adding a test on cli context, something like :
Comment #5
willzyx CreditAttribution: willzyx commented@dom18fr probably your problem is not related to the access checking. As you can see
dd()
(alias for\Drupal\devel\DevelDumperManager::debug()
) writes the dump in the debug file in any case and only when it fails to write in the file checks the permission for show a messageComment #6
willzyx CreditAttribution: willzyx commentedComment #7
dom18fr CreditAttribution: dom18fr commented@willzyx thanks for repliying,
Actually, the DevelDumperManager::export() perform an access check using DevelDumperManager::hasAccessToDevelInformation, and it fails so $output is empty, resulting in writing nothing in drupal_debug.txt nor printing anything in the console.
My approach may be wrong, but the code snippet i post do solve my problem.
Comment #8
willzyx CreditAttribution: willzyx commented@dom18fr apologize for the previous answer, you are completely right :)
DevelDumperManager::debug() should not check for permission as was done in the previous drupal_debug() implementation. Added minimal test coverage for this
Comment #9
willzyx CreditAttribution: willzyx commentedComment #10
willzyx CreditAttribution: willzyx commentedComment #12
willzyx CreditAttribution: willzyx commentedCommitted and pushed to 8.x. Thanks!
Comment #13
guilopes CreditAttribution: guilopes commentedThanks guys for the fast support and solving!
Comment #15
guilopes CreditAttribution: guilopes at Dexa commented