1

EE 2.7.0, CI 5.4.8. Wygwam 3.1.2, and Publisher Lite 1.0.10.

I’m using CI to handle uploads and then the Wygwam/CI button to insert images directly into a body of text. Publisher Lite drafts and previews are turned on.

When saving or publishing entries with images inserted into a the Wygwam field using Wygwam/CI, the images are broken.

Here’s what I can deduce: Images inserted into the wygwam field are broken because they are generated using the temp_dir version of the image url. For example, if I insert an image, this is the img src prior to saving (and thus prior to CI saving to the filesystem):

http://example.com/?ACT=26&f=nyu12001_details_114__post.jpg&fid=1&d=1380212844&temp_dir=yes

Before hitting save, I can open that URL in a browser and see the image just fine. After hitting save, the URL is broken and in Publisher's draft preview I get a borked image. If I publish to the front-end, it is published with the temp_dir version as well, and thus also borked.

If I hit edit entry to return to the entry form, I see the image just fine in the CI field, but there is a borked image in Wygwam.

When I use the CI button in the Wygwam toolbar to insert the image again, this time I get the following URL:

http://example.com/?ACT=26&f=nyu12001_details_114__post.jpg&fid=1&d=418

And the image shows just fine on in the Publisher preview and on the front-end if published. This is expected, since this image has been saved to the filesystem.

Any thoughts? The temp_dir is system/expressionengine/cache/channel_images/path/to/image, which CI will auto-prune on submission, but I need to somehow update the img src to new URL after that happens.

I can confirm this only happens when Publisher is activated, as I believe Publisher co-opts the entry save/submit process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.