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: Cannot preview custom draft data for entries with only draft entry (no live entry)
Status | Resolved |
Add-on / Version | Publisher |
Severity | Critical |
EE Version |
Timothy Kelty
Jul 11, 2013Titles seem to work, and the right template is loading (using status=”{publisher:entry_status}”), but no custom data comes though.
Draft for entries that also have a live version seem to work fine.
Halp?
BoldMinded (Brian)
Did you add the status variable?
status=”your-custom-status{publisher:entry_status}”
Thats needed for instances just like this.
Timothy Kelty
Yep I did.
And its the right entry, the title is shown from the draft. I’ve also noticed Matrix data seems to be working too.
However, I have a text input, Wygwam, and a host of others that aren’t.
Again, if the entry has a published version, everything works fine.
BoldMinded (Brian)
So the fields that are not working are ones that use native EE db table storage. The ones that are working are using their own tables?
BoldMinded (Brian)
And just verifying that if you’re using 2.6 you’ve applied this patch? https://gist.github.com/litzinger/5718707
Timothy Kelty
Yep, it appears to be custom fields with data exp_channel_data.
Yep, running EE 2.6.1 with both patches are applied.
I can send you another site dump if it helps.
BoldMinded (Brian)
yeah, lets try another site zip.
Timothy Kelty
Ok, I added it to the site url field for this ticket. I stripped down the blog/detail template for testing, so try it with a new draft in the blog channel.
FYI - I also have a hack in there currently to show the query string (?publisher_status=draft) above the iframe, as the client wanted to be able to copy for sharing.
Timothy Kelty
It’s still uploading, if you’re trying to d/l, give it a couple minutes.
BoldMinded (Brian)
I won’t actually be able to dig into this until Sunday evening probably. Have a busy weekend ahead of me.
BoldMinded (Brian)
Can you provide some direction on how I’m supposed to setup the site? I blew away the old files I had and can’t seem to figure it out this time. This is perhaps the most unique EE setup I’ve ever seen.
Timothy Kelty
Hah, yeah sorry about that.
All you should have to do is create an config/environment.yml file and make it look something like this (all you really need is the database stuff):
Timothy Kelty
Sorry I think I gave you a working copy last time, this time I just git archived it. My bad, I know it’s far from a standard setup.
BoldMinded (Brian)
what about the site_url, where is that set?
Timothy Kelty
Crap, I know your problem. Last time I ran composer install before I sent you the files, those are unsourced so they’re not in the repo.
I’ll send you another dump, you can use the same db.
Or if you have composer installed, just run
composer install
at the root.BoldMinded (Brian)
I don’t have composer install on my personal computer yet, but I need to get it, so I’ll try it tonight.
Timothy Kelty
Ok, otherwise I’m uploading a new zip to dropbox.
All you should have to do with that one is replace the db credentials in config/environment.yml
Sorry to throw you into the world of our crazy undocumented bootstrap with no warning!
BoldMinded (Brian)
No worries. Most of it made sense, just wasn’t sure what I was missing.
BoldMinded (Brian)
Go to line 501 or so of ext.publisher.php and change it to this
And go to models/publisher_entry.php line 546 and change the if to this
That fixes it for me locally.
BoldMinded (Brian)
Also, I noticed a crap ton of extra queries being run. In Publisher_helper_url.php line 275 or so change the beginning of the is_valid_url method to this:
And go into the publisher_template model and make build_template_collection public.
Timothy Kelty
Seems to work!
Also had to change the build_template_collection method from private to public to avoid this error on publish:
Fatal error: Call to private method Publisher_template::build_template_collection() from context ‘Publisher_helper_url’
BoldMinded (Brian)
Sweet. I’ll get this in the next release then.
BTW, that query change removed 1700 queries from your page load :-O
Timothy Kelty
Hah! Yeah, I noticed that one when I was looking at my profiler report too.
Hard to notice some of those things until they’re compounded by that many entries!
Thanks again.
BoldMinded (Brian)
Np. Yeah, thats the first time I’ve seen that many queries before… I monitor that when testing b/c I know this could happen, but I’m not sure how or why this one just now appeared.
BoldMinded (Brian)
Is this safe to mark Resolved?