Block refresh is:
- always working when the argument is [current-user:user];
- not working when the argument is [current-page:user].
But when there is an ajax event in the views (a flag button views field which is pressed for instance), the block refresh is loading and working, after being triggered by the ajax event.
After searching in the file I found that the scope of the js is 'footer'
.
I changed it to 'header'
just to see and it works in all situations.
I currently don't know how to suggest a patch, I am not there yet, hopefully arriving there in a few weeks or months. I'll suggest this later on if there aren't any reason why the scope should stay in footer.
The file is block_refresh.module line 19 :
function block_refresh_init() {
if (user_access(BLOCK_REFRESH_ACCESS_CONTENT_PERMISSION)) {
<strong>drupal_add_js(drupal_get_path('module', 'block_refresh') . '/js/block_refresh.js', array('scope' => 'footer'));</strong>
drupal_add_css(drupal_get_path('module', 'block_refresh') . '/css/block_refresh.css');
drupal_add_js(array(
'block_refresh' => array(
'settings' => variable_get('block_refresh_settings', array()),
'args' => arg(),
'query' => block_refresh_get_query_as_string(),
)
), 'setting');
}
}
Comments
Comment #1
Tritof CreditAttribution: Tritof commentedComment #2
Tritof CreditAttribution: Tritof commentedComment #3
Tritof CreditAttribution: Tritof commentedI just noticed that if I use it with an admin account, it is loaded at first.
Comment #4
Tritof CreditAttribution: Tritof commentedActually, after a few more tests, it is all about the arguments, I am updating the issue description
Comment #5
tripper54 CreditAttribution: tripper54 commentedHi Tritof,
Thanks for reporting. To clarify, so I can reproduce:
* is this a views block you're trying to refresh?
* where are the arguments you mentioned used?
If you can provide a sample view (export) to demonstrate the bug, that would be most helpful.
Thanks
Comment #6
tripper54 CreditAttribution: tripper54 commentedClosing this as I haven't heard back. Please feel free to reopen with more info if required.