5

First time using Better Workflow and it's been really great for the client.

However, we have a weird issue with previewing images. We're using the approach of having content images inside a Matrix and then placing image slugs within the content and using NSM Transplant to replace the slugs with CE Image.

When we look at the page preview in BW, the src for the image is empty. However, when we publish the page and look at it on the front-end, the images are output as we'd expect.

{exp:channel:entries {gv_param_disable_default}}
{!-- resolves a weird BW issue with Playa field --}
      <!--
{cf_content_related_documents:total_children}
{cf_content_related_content:total_children}
{cf_content_contact:total_children}
{cf_content_cta:total_children}
 -->

      <h1>{title}</h1>

      {exp:ce_img:single src="{cf_content_hero_image}" allow_scale_larger="yes" width="1067"}

      {cf_content_intro}



     {cf_content_body_images}
    {exp:nsm_transplant:content id="image_{row_count}"}
        {exp:ce_img:single src="{image}" width="{width}" class="{align}" alt="{alt}"}
    {/exp:nsm_transplant:content}
{/cf_content_body_images}



{exp:nsm_transplant:body}
{cf_content_body}
{/exp:nsm_transplant:body}

      {/exp:channel:entries}
4
  • Are you by any chance storing the images on an amazon s3? Dec 21, 2012 at 3:13
  • no - they're stored locally Dec 21, 2012 at 4:57
  • What version of Better Workflow and Matrix are you using? Better Workflow support was just added to Matrix as of version 2.5, and that requires Better Workflow 1.5. Dec 27, 2012 at 19:40
  • yeah using the latest version of everything Dec 28, 2012 at 0:41

2 Answers 2

2

I started troubleshooting from Twitter. First off the caveats, I haven't used CE Image, Better Workflow or NSM Transplant. But my first thought was that the issue maybe NSM Transplant.

After watching the 'advanced' video for NSM Transplant, I'm fairly certain this maybe your issue.

When we look at the page preview in BW, the src for the image is empty. However, when we publish the page and look at it on the front-end, the images are output as we'd expect. - Steve Grant

I believe the reason for this, is because NSM Transplant does the replacements at the template level, so unless you've created the Preview template to also contain and use the {exp:nsm_transplant:content id="image_{row_count}"}{/exp:nsm_transplant:content} tags, then the images won't display in preview, because they don't currently exist for the record, NSM Transplant hasn't been called yet.

Are your preview pages custom designed? or are they just the Better Workflow preview pages?

You can check with Better Workflow/Electric Putty. Based on their docs, occassionally…

N.B. Better Workflow's preview feature relies on the standard /template_group/template/entry_id format for its URL so you should be able to simply select the channel's default template. However, depending on how your template is constructed, it may sometimes be necessary to create a 'preview specific' version. -ElectricPutty Documentation

But based on the video and reading skimming through the documentation, I wouldn't expect the images to fully display until after the post is published. So this maybe a situation where a specific preview template needs to be constructed for these items.

1

Just a thought, not an answer -- have you considered trying another snippet-move mechanism?

Stash (http://devot-ee.com/add-ons/stash) appears to be like all Mark Croxton makes, pretty solid stuff.

It might be taking a different approach that could matter, when you're using it in the Better Workflow previewer. One way to see...

1
  • I've looked at Stash but unsure of how I'd implement it in this scenario without fundamentally changing how the template is built. Dec 27, 2012 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.