Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Publisher Lite, Wygwam, and Channel Images and Previews

Status Resolved
Add-on / Version Publisher Lite 1.0.10
Severity Critical
EE Version 2.7.0

Brian

Sep 26, 2013

Hiya,

I’m using 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. I am using Publisher Lite for its draft support, but when saving or publishing entries with image generated using Wygwam/CI, the images are broken.

Here’s what I can deduce: Images inserted into the body of the post are broken because they are persisted using the temp_dir version of the image url that’s generated by CI. For example, if I insert an image into the body of the post, 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 the image preview I get a borked image. If I publish to the front-end, it is published with the temp_dir version as well.

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.

I’m wondering if there’s anything you might be able to deduce from CI’s working with publisher. I’ve also posted over at DevDemon to get their help and I might also send a note to P&T to see if they have any thoughts. Let me know if you want to take a look at the dev site again; I’ve spun it down for the moment cuz Amazon charges for those CPU cycles 😊.

Thanks.

Brian

#1

BoldMinded (Brian)

Have you disabled Publisher via its first setting? I’m trying to think of how Publisher could be causing the path to mess up, but nothing rings a bell. On save Publisher just passes the data through to the fieldtype save methods and doesn’t modify anything. It will try to correct the {filedir_x} values on output, but all it does is find that variable and replace it with the path defined in the upload path preferences, so its pretty standard stuff.

#2

BoldMinded (Brian)

If CI uses a query string for the path and disabling Publisher fixes the images then its probably a Publisher issue. If you re-add the FTP and CP creds to this ticket I can login and take a look, otherwise it’ll be a couple days before I have this replicated locally. Closing tickets deletes that info from my DB, which is why you’d have to re-add the info to this ticket.

#3

Brian

Ok. I entered all the credentials again. Let me know if you find anything. Thanks again!

#4

Brian

Oh, one more thing: you should test with entries to the News channel. That’s the only channel I’ve set up with a preview template.

And a final thing: there is another issue I’m seeing with the 3 most recent open posts to the News channel where Publisher does not recognize images uploaded to CI before Publisher was activated. You’ll see in entries 392, 396, and 402 that the CI field is blank and the post is in a draft state. But starting from 379 backward and any new posts made, the CI field operates correctly (except for this temp_dir issue).

Didn’t want that to throw you off if you were looking at older posts, even tho it’s a separate question…

Thanks!

#5

Brian

Sorry – updated the FTP PW to the correct one. my bad!

#6

BoldMinded (Brian)

Have you changed anything recently? I’m playing with the Test Post entry and everything seems to be working fine.

#7

BoldMinded (Brian)

Have you heard anything from DevDemon? I just can’t think of how Publisher would be causing this. It only parses the content for {filedir_x} tags and valid server paths, which this is not. And the fact that it only fails on new images that have that temp directory thing also leads me to believe it probably isn’t Publisher related.

Did you try setting up a Wygwam and CI field in a non-Publisher managed channel?

#8

BoldMinded (Brian)

I disabled Publisher and tried it again. It looks like when you click the submit button CI is adding some green text to the bottom of the publish form and performing some ajax request. I didn’t see this when Publisher was enabled. The submit button in the Publisher bar is added to the page after the DOM loads, so its possibly CI is trying to bind an event to the button… which isn’t present yet.

If you contact DevDemon and have them chime in on this thread maybe they can tell me what I can do to help fix this.

#9

BoldMinded (Brian)

There is probably a change I can make to help, but it might be better if DevDemon binds the ajax call to the form submit, not the button itself.

#10

Brian

Thanks for looking into that! Your theory sounds good to me. How does CI listen for tbe click? Is it an element id?

I haven’t heard anything from DevDemon yet. I posted again to that forum thread I started with your update and a link back to here. I also submitted a ticket through their official support system, but didn’t hear anything beyond their automated response.

I’ll play around with this lead you’ve uncovered and hopefully DD will respond in time.

Thanks! Brian

#11

BoldMinded (Brian)

Not sure how it listens for the click. I’m going to play around with cloning/moving the submit button instead of just hiding the original and creating my own, which its doing now. Will get back to you later tonight on that.

#12

Brian

Thank you. I’ll let you know if I come up with anything or if I hear from DevDemon.

#13

Brian

DevDemon checked in, but no progress yet.

#14

Brian

Hey there,

Just thought I’d add in this reply I got from DevDemon:

Actually i found the real issue. Channel Images when saving an entry will go and grab all wygwam fields and change those URL's and save the content back to the field.

This obviously will not work with Publisher, since publisher saves their data somewhere else.

I am going to ask P&T if he can sneak in a extension hook real quick in Wygwam so i can do my thing regardless of Publisher/Better Workflow etc.

Hopefully there will be a fix soon.

#15

BoldMinded (Brian)

Sounds like this is being resolved by DevDemon and P&T, so closing this ticket.

Login to reply