Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
i used this module in combination with adsense module + revenue sharing. By activating ajax blocks and block configuration return my site folowing error on every pageload and the block content (advertisment) is not show on:
Notice: Array to string conversion in ajaxblocks_ajax_handler() (Zeile 276 von /drupal-7/sites/all/modules/ajaxblocks/ajaxblocks.module).
With other block items (images, other js scripts) this module works fine.
What goes wrong here?
Greetings
Frank
Comment | File | Size | Author |
---|---|---|---|
#14 | ajaxblocks-2149593-14.patch | 826 bytes | cwoky |
#5 | ajaxblocks_2149593_php5_4.patch | 870 bytes | seanbfuller |
Comments
Comment #1
Frank.dev CreditAttribution: Frank.dev commentedCould the problem may be related to the PHP version 5.4 I use?
Comment #2
Emilio13 CreditAttribution: Emilio13 commentedHave the same problem, but I dont use Adsense module.
I use PHP 5.4 - I think problem related to that. Like this problem - https://drupal.org/node/1511396
Comment #3
Emilio13 CreditAttribution: Emilio13 commentedI'm edit ajaxblocks.module - after
add:
And replace
with:
Seems like it solve my problem.
Comment #4
Frank.dev CreditAttribution: Frank.dev commentedThank you, Emilio, after I insert the changes disappear the error messages. :-)
However, advertising is not yet displayed.
Adsense is set up correctly and I suspect that the script of the ads do not just play along here.
Comment #5
seanbfuller CreditAttribution: seanbfuller commentedChanging the title as this definitely seems to be an issue with PHP 5.4. Attached is a patch based on #3. Marking s needs review. Thanks!
Comment #6
marcoka CreditAttribution: marcoka commentedfixed the notices here.
Comment #7
mjgruta CreditAttribution: mjgruta commentedI'm not sure if we really need to do this as "drupal_array_diff_assoc_recursive" is already part of Drupal and will always be true.
I used this code instead.
or use it directly.
Comment #8
spesic CreditAttribution: spesic commented#5 worked for me.
Comment #9
greenmother CreditAttribution: greenmother commented#5 helped me, thank you seanbfuller
Comment #10
egontinno CreditAttribution: egontinno commented#5 worked for me.
Comment #11
chriso CreditAttribution: chriso commented@jhayzon - that function only became available in Drupal 7.23 (#1850798-90: Add a recursive version of array_diff_assoc()) so it might be sane to leave the check in there.
#5 patch has been working for me too for a while, and I've just checked it again against a fresh 1.x-dev. Setting as RTBC.
Comment #12
gausarts CreditAttribution: gausarts commented+1 RTBC for #5. Thanks
Comment #13
W.M. CreditAttribution: W.M. commented#5 solved the problem here. Strange, I was getting the error message only over http protocol. Under https no error was logged to dblog.
My system is PHP 5.6.2.
Comment #14
cwoky CreditAttribution: cwoky commented#5 The patch doesn't work with 'drush make' command.
Here is a new patch that work with 'drush make' command.
Comment #16
maximpodorov CreditAttribution: maximpodorov commented#5 is committed: http://drupalcode.org/project/ajaxblocks.git/commit/4c93616
Thank you for your patience.
Comment #18
maximpodorov CreditAttribution: maximpodorov commentedThe similar solution is committed in 6.x-1.x: http://drupalcode.org/project/ajaxblocks.git/commit/53d4ee4