Closed (fixed)
Project:
Wysiwyg Fields
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2012 at 08:08 UTC
Updated:
26 Jun 2015 at 02:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
decipheredHi Tormu,
I'll need to test things out to see if I can reproduce the issue, any tips you have, or access to a site with the ability to reproduce would be helpful.
Cheers,
Deciphered.
Comment #2
tormu commentedWe will be testing this problem more thoroughly later this week to see if it's really wysiwyg_fields-bug or a bug somewhere else. I'll inform here right away when we get some new info.. We didn't see this problem until the site (http://blogit.yle.fi) was live, so it might have to do with something conflicting with something else.
Comment #3
decipheredIts the Filter component, so there could be a conflict with another Contrib filter, at least that's where I would start looking.
Comment #4
wroxbox commentedThis is just a good guess by Olli. The filter works correctly.
In some situations the next function will not return filter.inc to be included.
We'll try to reproduce.
Comment #5
decipheredVery curious, if you can show any evidence that module_list() isn't returning Filter then there is bigger problems here than Wysiwyg Fields not working properly.
Comment #6
wroxbox commentedAs we talked in IRC about the $SESSION issue. Here is patch to use drupal_static.
There is also some php strict error fixes included in the patch.
We haven't yet tested if this really fixes the initial problem, but this is one step further.
Comment #7
wroxbox commentedHi Stuart!
We simplified the patch to not have any cache_set get.
Comment #8
olli commentedHello,
To reproduce the issue you need to make one extra node_load before actually viewing the node. In our case it appears to be redirect-module. Steps to reproduce:
1. Install standard drupal, wysiwyg_fields and redirect
2. Create an article having some images added via wysiwyg_fields
3. Clear caches (or truncate cache_field)
4. View the article - tokens are shown
5. Refresh the page - images are shown
(repeat steps 3-5)
Instead of enabling redirect module you could also add the following line in page.tpl.php:
print isset($node) ? render(node_view(node_load($node->nid))) : '';What happens is that wysiwyg_field-tokens are not processed during the node_load called in _wysiwyg_fields_filter_process() and the result of this node_load is cached statically by entity controller. Therefore any subsequent call to node_load will return a node with unprocessed wysiwyg_field-tokens.
As a workaround we added $vid parameter to node_load in _wysiwyg_fields_filter_process(). Any other suggestions?
Comment #9
olli commentedI think another way around this would be to temporarily disable caching of text formats, process the tokens, restore caching of formats and reset the static cache of entity controller for wf_nid.
Is wysiwyg_fields going to support revisions?
Comment #10
decipheredIt's an interesting issue, and I have been able to reproduce it and am still trying to determine the correct fix for the issue.
The workaround you described in #8 won't work as I've moved away from node_load in favour of entity_load so that Wysiwyg Fields can be fully Entity agnostic.
I'm interested in hearing what sort of revision support you'd be interested in and how you would expect it to work, it's not something I've put a huge amount of though into as of yet.
Comment #11
nicksanta commentedWe've experienced this issue intermittently since we launched our website 2 years ago.
I finally have time to take a look at it, will let you know if I come up with a workaround or solution.
Comment #12
nicksanta commentedUpgrading to the latest 7.x-1.x-dev snapshot has seemed to fix the issue.
Comment #13
decipheredMarking as fixed.
As an aside, Wysiwyg Fields 7.x-2.x uses standard tokens (as defined by a newly required module) and they are processed by the required Token Filter module, so this shouldn't become any issue anymore, atleast not a problem with Wysiwyg Fields.