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 Preview in iFrame is not rendered after clicking “Save & Preview”

Status Resolved
Add-on / Version Publisher Lite 2.6.5
Severity
EE Version 3.5.11

derek allard

Nov 03, 2017

Description: I am having trouble making Publisher show the preview of a post after clicking “Save & Preview.”

Detailed steps to reproduce the issue:
1. Login to the Backend
2. Navigate to Edit > Blog
3. Edit the first entry in the Blog channel, add a space or a word.
4. Click “Save & Preview”

At this point I would expect the post to be previewed in an iFrame window as it has in the past.

You helped us in the past but this is in a new development environment (Ticket #1471). I implemented all the suggestions you made in the past including:
-Making sure the Blog channel is managed as an Asset in Structure.
-Adding status=”{publisher:entry_status}” to the expression engine tag in the blog/post template. See below.

<!DOCTYPE html>
<html lang="en">
	<head>
{exp:channel:entries channel="blog" limit="1" disable="pagination|trackbacks" track_views="one" require_entry="yes" status="{publisher:entry_status}"}

{exp:ce_cache:add_tag}{entry_id}{/exp:ce_cache:add_tag}
{snp-cache}

{if no_results}{redirect="404"}{/if}
		<title>{if bmeta-title != ""}{exp:xml_encode}{bmeta-title}{/exp:xml_encode}{if:else}{exp:xml_encode}{title}{/exp:xml_encode}{/if}</title>
		<meta name="description" content="{exp:xml_encode}{bdescription}{/exp:xml_encode}" />

{embed="_includesV2/.html-head"}
		<link rel="alternate" type="application/rss+xml" title="RSS" href="http://feeds.feedburner.com/gocanvas?format=xml" />
		<link rel="canonical" href="{url_title_path="blog/post"}"/>
	</head>
	<body>


{embed="_includesV2/.header"}

{embed="_includesV2/.subnav-about"}
			<div class="white-bg p-xl">
				<div class="clearfix">
					<div class="col-xs-8">
							<div class="col-xs-11 float-none center-block">

								<h1 class="h2">{title}</h1><p class="m-t-md">
									By <strong>{author}</strong> on {entry_date format="%F %j, %Y"}<br/>
									<small class="text-bold">Tags: </small>
										{categories show_group="not 4" backspace="2"}<a href="{path=blog}">{category_name}</a>, {/categories}
									</p>

<div>

<p><br />
									{bbody}<br />
									{/exp:channel:entries}<br />
									<br /></p>
</div>

<p><br />
								<!-- AddThis Button BEGIN --><br /></p><div class="addthis_toolbox addthis_default_style">
<p>									<a style="padding-right: 20px;" class="addthis_button_facebook_like" fb:like:layout="button_count"/><br />
									<a class="addthis_button_google_plusone"/><br />
									<a class="addthis_button_tweet"/><br />
									<a href="http://www.addthis.com/bookmark.php?v=250&username=canvasmobileapps" class="addthis_button_compact">Share</a><br /></p>
</div><script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script><script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js#username=canvasmobileapps"></script>
<p>								<!-- AddThis Button END --></p>

<div id="disqus_thread"/>
<p>								<br /></p><script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = 'gocanvas';

    /* * * DON'T EDIT BELOW THIS LINE * * */
    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
								</script><noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a>
								</noscript>
</div>

<p><br /></p>
</div></div>

<p>{embed="_includesV2/.sidebar-blog"}<br />
						<br /></p>
</div></div>

<p>{embed="_includesV2/.footer"}</p>

<p>{embed="_includesV2/.analytics"}<br /></p>
</body></html>

-Manually setting the preview template for the Blog Channel in it is managed as an Asset and not a Listing—“blog/post + post URL”

#1

BoldMinded (Brian)

Making it an asset in Structure doesn’t create a static page url for the entry, thus its assuming the entry needs to be loaded via a template-group/template based url. Have you configured the Preview Templates?

https://www.dropbox.com/s/w3nx3l2lwsxlgh1/Screenshot 2017-11-04 15.10.11.png?dl=0

#2

derek allard

Hi Brian,

The last line of my ticket was:

“-Manually setting the preview template for the Blog Channel in it is managed as an Asset and not a Listing—“blog/post + post URL””

Might’ve gotten lost under the code snippet. Let me know what you think and thanks!

#3

derek allard

Just reopening ticket so I can write what resolved issue.

The CP was rendering a PHP error at the bottom of the page:

Warning

Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/5.6/session)

Unknown, line 0 show details

After resolving this error, the iFrame rendered again.

#4

BoldMinded (Brian)

I feel like I recall you having a similar issue with CSM? Are you using the same hosting provider? If so I’d recommend finding a new one because I’ve never seen this happen before personally or from another customer. Seems like they have some very odd server configurations.

Login to reply