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.
The flvmediaplayer_profile_edit_form_submit function not correctly clears the cache table.
You call this:
cache_clear_all('%'. $form_values['name'], 'cache_flvmediaplayer', true);
But this doesn't do anything, because in the cache_flvmediaplayer table there are items like this:
"flvmp_112_d41d8cd98f00b204e9800998ecf8427e"
I fixed this temporary by this change in flvmediaplayer_profiles.inc:
change:
cache_clear_all('%'. $form_values['name'], 'cache_flvmediaplayer', true);
into:
cache_clear_all('*', 'cache_flvmediaplayer', true);
Need a better solution.
Comment | File | Size | Author |
---|---|---|---|
#4 | flvmediaplayer-clear-cache.patch | 782 bytes | mrfelton |
Comments
Comment #1
arthurf CreditAttribution: arthurf commentedActually, in the dev release its:
which should take care of the issue. I haven't written the migration script to take your current configurations to the dev version configuration options which is the part that is still out standing.
Comment #2
mrfelton CreditAttribution: mrfelton commentedI find that no matter what changes I make to my profile, the node outputs the player the same. Looking at the cache_flvmediaplayer, I can see that it has an entry in there for my node, and it is not getting updated when I:
a) alter the player profile
b) edit the node
c) flush all my caches using the devel module.
Infact, I can find no way to clear that cache out at all.
Comment #3
mrfelton CreditAttribution: mrfelton commentedIt seems that the cache has been stored without the profile_id appended.
The name of my profile is 'default'.
The cache entry has an id of 'flvmp_1_'
I think it should actually be 'flvmp_1_default'
Because in flvmediaplayer_profile_edit_form_submit() you call:
where $data['name'] holds the name of the profile ('default' in my case).
So the question is... why is the cache being saved without the profile id appended?
Comment #4
mrfelton CreditAttribution: mrfelton commentedI think the problem was that you were not passing the profile_id to the theming function when embedding the player in hook_nodeapi
on line 131, I changed:
to:
and all seems good now (with limited testing). Patch attached.