The module does not seem to work, tried latest version and dev.
On every page load the module gives the following errors.
Php
Notice: Undefined index: block-views-5a7396bf6e77793d7875ed401e88ba65 in block_refresh_block_content() for block_refresh.module lines 218 and 219
Warning: Cannot modify header information - headers already sent by (probably resulting from the error above)
Page not found
block_refresh/views/5a7396bf6e77793d7875ed401e88ba65
All errors occur multiple times for each page load, I have attached a screenshot to clarify the order and occurrences.
After uninstalling the module
The page not found errors keep coming up in the error log so something is going wrong there as well.
I attached a screen shot for that too.
I would appreciate some help to get the rid of al the left overs :)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | block_refresh_not-2631432-2.patch | 794 bytes | tripper54 |
| Schermafbeelding 2015-12-09 om 02.17.47.png | 127.11 KB | danon1981 | |
| Schermafbeelding 2015-12-09 om 02.12.05.png | 149.1 KB | danon1981 |
Comments
Comment #2
tripper54 commentedThat all sounds rather disturbing!
Firstly, the 'errors after uninstall' issue:
Looking at your logs, after you uninstalled the module, the notices disappeared, but you still got the 404s. That suggests to me that the block refresh js is still running even though the module is uninstalled. I would guess that might be a due to some caching. Try flushing all your caches (drupal + any external caches like varnish or cloudflare).
As to the php notices:
So I gather the JS is calling back a module-delta combo that doesn't exist in the block_refresh_settings array. Again this might be due to caching, where cached pages contain stale data in drupal settings JS about removed blocks.
The attached patch checks for the presence of the block_id key in the block_refresh_settings array, so it should fix those notices.
Comment #3
danon1981 commentedThanks for the rapid reply, sorry I wasn't able to reply quicker.
My first thought was that caching would be the culprit as well, So I tried flushing all caches. To be sure I also turned off APC on the server I'm running from. The directory containing the website was set up not to be cached by APC but to be absolutely sure I decided to turn it off. Apart form the Drupal cache and APC there is no caching method active.
Even after al caches are disabled or flushed I still get the 404s. Even when I remove the module's directory entirely (after uninstal) I get the 404s. Could there be something in the db that is calling the url?
I have no idea where these 404s are is still coming from.:S
I did not try the patch because I'm focused on getting it removed first. From what you wrote about the patch I understand this will benefit me when the module is active.
Comment #4
tripper54 commentedThe only place in my code where that page is called from is in block_refresh/js/block_refresh.js .
If you're not serving stale/ aggregated JS, I have no idea where those requests are initiated from I'm afraid.
Are these 404s just appearing at random in your production environment? Or can you manually trigger them by loading a page?
If it's the former, there could be someone out there with a stale version of a page in their browser that is still running the old JS and is making the AJAX calls on the block_refresh/xx endpoint that no longer exists.
If it's the latter, can you have a look your network panel in your browser debug tools to see what script initiates the calls to /block_refresh/xx ?
Comment #5
danon1981 commentedThe site is in staging situation to receive content while testing and finishing the latest features. After flushing all browser caches, from browsers that access the site at this point the 404s disappeared so apparently it was being called from a browser cache.
Thank you for the support and fresh/objective insight on the matter!! I got a bit blind sided by the different errors/warnings.
Comment #6
tripper54 commentedNo problem, I glad we could get to the bottom of this.
I'm going to commit my sanity check patch, which should fix php notices.
Comment #8
tripper54 commented