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.
First, I'm glad to have the "Use PHP eval function…" checkbox. It's a very good solution to balance security with advanced features.
However, PHP Code After Output doesn't seem to evaluate even when the "Use PHP eval function…" is checked. The PHP Code Before works fine with the checkbox checked.
I'm not sure if this should be considered a duplicate of this issue:
#2040739: Why the need for (php_)eval?
Comment | File | Size | Author |
---|---|---|---|
#4 | views_pdf-php-eval-after-not-working-2058887-4.patch | 770 bytes | vegansupreme |
Comments
Comment #1
killua99 CreditAttribution: killua99 commentedNever ending :)
Well I'm going to check again and see what's going on. Thanks for the report.
Comment #2
killua99 CreditAttribution: killua99 commentedWhich kind of code did you try?
Can put some code to see what do you want to do?? seems like it's not a bug the $content is already executed there and storage in the PDF when you use the eval after is to do something more like for the next row etc ..
Comment #3
vegansupreme CreditAttribution: vegansupreme commentedI tried it with
$this->AddPage();
and$this->writeHTML($html, true, false, true, false, '');
They both work in the before field, but not after.Comment #4
vegansupreme CreditAttribution: vegansupreme commentedLooks like there might have been a typo in the code for eval_after.
Here's a patch (my first!) that fixes the problem for me.
Comment #5
killua99 CreditAttribution: killua99 commentedI'll check that tonight.
Comment #6
killua99 CreditAttribution: killua99 commentedAnd yes ... was a huge typo, reviewed and commited.
Issue #2058887 by vegansupreme: Fixed PHP eval after not working.
You can fin it in a few hours in the dev branch. Thanks.
Comment #7
killua99 CreditAttribution: killua99 commented