Bug Report

Conditionals on same line as tags.

Date: 02/04/2010 Show-stopper?:
Status: Outside Issue Reporter: Bransin
Reported in Version: EE 1.6.8 Assigned To: Not Assigned
Keywords: User Interface, General Problems,
Support Thread:

Details

I’m wanting my code to be clean and organized without additional spacing caused by EE tags. Just like how PHP handles line spacing and parsing.

Apparently this will not work unless the if statements are located on their own line number.

Comment on Bug Report

Page 1 of 1 pages
Posted by: Robin Sowell on 11 February 2010 4:52pm
Robin Sowell's avatar

While you may want to do this when mixed with javascript (as there’s no good way for the parser to distinguish a js bracket and an EE bracket), it shouldn’t otherwise be an issue.

Do you have an example of a conditional that doesn’t work when on a single line?

Posted by: Bransin on 11 February 2010 8:30pm
Bransin's avatar

The example below works if split up on multiple lines, however it breaks on a single line with the output on the generated page as this: {embed=“site/.cover_random”

Here’s what I am doing
{if no_related_entries}{embed=“site/.cover_random”}{/if}

Posted by: Robin Sowell on 12 February 2010 10:22am
Robin Sowell's avatar

Hm- I’m still not able to replicate.  Are you definitely running the latest build?  There was a tweak to the conditional parser.  If that’s not it….

I tested with:

{exp:weblog:entries weblog="about" limit="15"}

<h3>{title}</h3>

{related_entries id="a_rel"}
 
<h4>{title}</h4>
{if no_related_entries}{embed="site/.cover"}{/if}
{
/related_entries}

<p>Submitted on{entry_date format='%M %d, %Y'}</p>

{/exp:weblog:entries} 

So- you might test with something very simplified.  Do you still have the last bracket stripped?

Posted by: Robin Sowell on 12 February 2010 2:23pm
Robin Sowell's avatar

Quick question- is this failing on a 1.6 install or a 2.0 install?  Because I do replicate the problem on 2.0- just not 1.6.

Posted by: Bransin on 12 February 2010 7:08pm
Bransin's avatar

Robin my apologies. This is the second time I’ve reported a bug for the wrong version. I couldn’t seem to find anything to select for version 2.0.

Yes this bug is happening in version 2.0

Posted by: Robin Sowell on 15 February 2010 10:03am
Robin Sowell's avatar

Ah- I entered a report in the 2.0 tracker here.

If you’re in the Bug tracker?  Take a look at the menu on the left side-

  * Public Beta Bug Tracker

That’s the bit you’ll want to be in to report a PB bug.  We like to keep them separate as it’s two different code bases and most of the bugs are version specific.

Glad we figured out what was up- and we’ll be sure to get it fixed up in 2.0.

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?