Module

Archived
Forum
(read-only)

SurgeEO

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Digital Surgeons

     

Pages working but not entries

Support Request

LMA Communications
LMA Communications

Hi,

I’m using Surgeeo for the first time and so far like it. I am however having some trouble getting it to work with individual entry pages. On “pages” no problems.

I’m using Low Variables and preparse to send the data to the template, preparse acts like embeds but reduces server load.

My lv-doctype-header template looks like this:

more code above...

  <
title>{if pre-title}{pre-title}{/if}</title>
  <
meta name="keywords" content="{if pre-keywords}{pre-keywords}{/if}" />
  <
meta name="description" content="{if pre-description}{pre-description}{/if}" />

more code below... 

Then in for example this template I have the following code - where swichee delivers different content based on the url using case logic. The switchee code is copied from further down the template where everything is working correctly. The first half is the list page template, which works, but the second half which calls the individual entries does not work.

{exp:switchee variable "{segment_2}" parse="inward"}
 
 {case value
="#^P(\\d+)$#|''|cat"}
    {exp
:low_variables:single var="lv-doctype-header" preparse:pre-title="{exp:surgeeo:page_title}" preparse:pre-keywords="{exp:surgeeo:page_keywords}" preparse:pre-description="{exp:surgeeo:page_description}"}
  {
/case}

  {case 
default="yes"}
    {exp
:low_variables:single var="lv-doctype-header" preparse:pre-title="{exp:surgeeo:page_title url_title='{segment_2}'}" preparse:pre-keywords="{exp:surgeeo:page_keywords url_title='{segment_2}'}" preparse:pre-description="{exp:surgeeo:page_description url_title='{segment_2}'}"}
  {
/case}

{
/exp:switchee} 

Additionally I’m having a similar issue on a template that only serves single entries (using the pages module)

{exp:channel:entries channel="pages" limit="1" disable="member_data|categories|pagination"}
  
  {exp
:low_variables:single var="lv-doctype-header" preparse:pre-title="{exp:surgeeo:page_title entry_id='{entry_id}'}" preparse:pre-keywords="{exp:surgeeo:page_keywords entry_id='{entry_id}'}" preparse:pre-description="{exp:surgeeo:page_description entry_id='{entry_id}'}"}

more code here
<body>
more code
</body>
{/exp:channel:entries} 

please advise.

dstechroom
# 1
Developer
dstechroom

Hello,

This seems to be a parse order issue. We’ve found sending plugin output to parameters of other plugins can be inconsistent.

Could you try adding parse=“inward” to the exp:low_variables:single tags themselves?

LMA Communications
# 2
LMA Communications

Hi,

There was no change when adding parse=“inward” the pages worked fine, but individual entries do not.

dstechroom
# 3
Developer
dstechroom

Perhaps an alternate strategy of using the suergeeo tags inside the low variable, then passing the arguments via preparse would help. Example:

Replace this:

{exp:low_variables:single var="lv-doctype-header" preparse:pre-title="{exp:surgeeo:page_title url_title='{segment_2}'}" preparse:pre-keywords="{exp:surgeeo:page_keywords url_title='{segment_2}'}" preparse:pre-description="{exp:surgeeo:page_description url_title='{segment_2}'}"}
  {
/case} 

with this:

{exp:low_variables:single var="lv-doctype-header" preparse:pre-url-title="{segment_2}"}
  {
/case} 

and this:

more code above...

{if pre-url-title}
  
<title>{exp:surgeeo:page_title url_title='{pre-url-title}'}</title>
  <
meta name="keywords" content="{exp:surgeeo:page_keywords url_title='{pre-url-title}'}" />
  <
meta name="description" content="{exp:surgeeo:page_description url_title='{pre-url-title}'}" />
{/if}

more code below
... 
LMA Communications
# 4
LMA Communications

No change with that one too…

Really want to use Surgeeo as I like the pages option alot (it works) vs what I was doing before (blog post).

Any other suggestions?

dstechroom
# 5
Developer
dstechroom

It seems like we will need to look much deeper into parse order on this one. Would you be interested in a free copy of BiopsEE, which would allow you to inspect what’s happening with more detail?

LMA Communications
# 6
LMA Communications

Hi,

unfortunately I need to have the SEO set up so our SEO guy can get everything added in today and then the site launches so I’ve had to go with an alternative solution.

Will try again on a future project.

dstechroom
# 7
Developer
dstechroom

We’re sorry to hear that! Totally understandable, given the nature of deadlines.

If you’d like a refund, devot-ee takes care of that here: http://devot-ee.com/returns

Sorry, and thanks again for trying SurgEO out.

The offer still stands for a free version of BiopsEE, which can help you determine parse order in your templates in order to debug what’s happening.

LMA Communications
# 8
LMA Communications

dstechroom,

Sure a copy of BiopsEE would be awesome. No need to refund as i will be trying surgeeo out again, hopefully wiht more time available to troubleshoot.

dstechroom
# 9
Developer
dstechroom

Great - I just sent BiopsEE to your account - you should get an email notification.

LMA Communications
# 10
LMA Communications

Thank you. Greatly appreciated.