Closed (fixed)
Project:
Advertisement
Component:
ad.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Jan 2007 at 17:04 UTC
Updated:
14 Feb 2007 at 19:46 UTC
I added a second banner, and immediately it was the only banner which would display (of two entered and activated). Now after a couple minutes of browsing and not seeing the banner change from the second one entered, no banners are being displayed, and I get the following error three times in the message area:
warning: Invalid argument supplied for foreach() in /home/rpgmap/public_html/modules/ad/ad.module on line 1848.
Comments
Comment #1
jeremy commentedDid you enable the file cache? This message suggests that you have the file cache enabled. If so, try disabling it and see if your problem goes away. (It is configured at administer -> ads -> settings.)
It would also help to gather some debug information. Can you edit the module and add the following line, then reload the page and send me the resulting output? Go to line 1847 and insert three lines that read:
Thus, the resulting area of code will look like this:
It will be very helpful if you can collect this information -- I'd like to understand what's going wrong for your installation and to get this problem resolved. Thanks for helping beta test this module.
Comment #2
Steel Rat commentedYes, I enabled file cache, since the only other option was none.
I'll try adding those lines and get you the output.
Comment #3
Steel Rat commentedI added those three debug lines, and now the error output shows:
Nothing is printing before the ForEach..
Comment #4
Steel Rat commentedLooks like both my banners went to Expired, even though I had manually emptied the fields.
Anyway, I changed cacheing back to none, and re-activated the banners. No more errors displaying.
But I briefly got this ouput on the screen all by itself:
Array
(
[last_sync] => 1170269266
)
Array
(
[last_sync] => 1170269266
)
Array
(
[last_sync] => 1170269266
)
Comment #5
jeremy commentedThese errors were because you didn't have any active ads. I've added a test to be sure there are ads before trying to loop through them to prevent these errors from happening. The real bug is why your ads are being expired which is being tracked in another issue.
Comment #6
Steel Rat commentedSo I think the "Stopped working" perception on my part was that all the banners suddenly expired, as mentioned in another issue.
Comment #7
jeremy commentedCorrect. So why did you mark this issue as active again?
Comment #8
jeremy commentedAh, looking at timestamps I think you were updating this issue at the same time I was. Marking "fixed" again.
Comment #9
(not verified) commented