Skip to main content
Inspiring
July 1, 2020
Question

Extra spaces with condition tags

  • July 1, 2020
  • 14 replies
  • 289 views

I'm using RH 2019 (reimagined), update 14, and there are extra spaces sometimes appearing before condition tags that seem impossible to remove.

 

For example, in Author view, note the extra space between InformaCast and Mobile in the following sentence: 

 

You will be redirected to a page where you will have to enter your password unless you are already logged into your account, in which case you will be immediately logged into InformaCast  Mobile Fusion.

 

The Source view looks like the following: 

 

You will be redirected to a page where you will have to enter your password unless you are already logged into your account, in which case you will be immediately logged into InformaCast <span data-condition="Others:Mobile"> Mobile</span><span data-condition="Others:Fusion"> Fusion</span>.

 

You can see that there are two spaces (one after InformaCast and one before Mobile).

 

However, when I remove that space either in Author or Source view, save it, and then view it in Preview view, it comes back. There's seemingly no way to get rid of it. However, it does not seem to be present in the actual published content (I'm using HTML5 output).

 

Elsewhere on that page, the same tags are used with no ill effects (Author view): 

 

You will be redirected to the gateway, which will return you to InformaCast Mobile Fusion once you’ve been authenticated.

 

And in Source view:

 

You will be redirected to the gateway, which will return you to InformaCast<span data-condition="Others:Mobile"> Mobile</span>
<span
data-condition="Others:Fusion"> Fusion</span> once you’ve been authenticated.

 

How do I fix this?

    This topic has been closed for replies.

    14 replies

    Inspiring
    July 7, 2020

    I don't want to say that's impossible, but it would be difficult. These are our products' names, they appear frequently in over 900 topics, and spaces have always been included before without this wonkiness. Indeed, in that same topic, they appear just fine with spaces in other places. It's just odd.

    Peter Grainge
    Community Expert
    Community Expert
    July 7, 2020

    Avoid spaces at the beginning or end of a tag?

     

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Inspiring
    July 7, 2020

    Oh, I see what you've done now.

     

    The tags in the sentence that start with "If you have more than one provider..." do work how I intended (this problem doesn't affect all instances of the Mobile condition tag, just some).

     

    I've been trying to have the Mobile and Fusion instances include the space before them within the tag because I sometimes just copy and paste these all through a topic and when they fall at the end of a sentence, there isn't somehow an extra space before the period.

     

    The following picture shows the Source view from a condition tag that's working and you can see the space highlighted in blue: 

     

    If, using the Okta code you also cited, I remove the space included with the tag and Mobile and put it instead after InformaCast (and not within the tag), save it, change views, it does work, which doesn't make any sense because then there should be an extra space between InformaCast and Fusion when that output is selected because the Fusion tag does have the space within it and is working as intended. Here's that code with the spacing highlighted in blue in two spots:

     

    Here's the output for Mobile:

    Here's the output for Fusion:

    There's no double space between InformaCast and Fusion, yet the code clearly shows a space after InformaCast (not included in a tag) and a space in the tag with Fusion. 

    Peter Grainge
    Community Expert
    Community Expert
    July 7, 2020

    I can do that later but the only change is there is a space where you see the cursor and no space in front of Mobile.

     

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Inspiring
    July 7, 2020

    Peter, could you include what the Source view looks like with your changes? 

    Peter Grainge
    Community Expert
    Community Expert
    July 7, 2020

     

    This is what you had in the topic. The space after InformaCast was included in the Mobile tagging.

     

     

    Note in source view there is no space between InformaCast and the span tag but there is one before Mobile within the tag.

     

     

    I changed that in source view so that there is a space after InformaCast and the span tag and no space between the end of the tag and Mobile. In author mode it looks like this and seems to work.

     

     

    Are you saying those changes do not work for you?

     

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Peter Grainge
    Community Expert
    Community Expert
    July 6, 2020

    Can you share the project? If you can, then see the Contact page on my site and send the project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.

     

    When sending, make sure you let me know which topic has the problem.

     

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Inspiring
    July 6, 2020

    OK. I tried two things:

    1. I copied and pasted the entire snippet (shown below) from the working topic to the non-working topic. The extra space is there in the non-working topic, even though it's not in the working topic.  

      <p><span style="font-weight: bold;">Google.</span> You will be redirected to a page where you will have to enter your password unless you are already logged into your Google account, in which case you will be immediately logged into InformaCast
      <span
      data-condition="Platform:Online"> Mobile</span><span data-condition="Platform:Print"> Fusion</span><span data-condition="Platform:Print"></span>.</p>
    2. I complete erased the text, retyped it, and applied the condition tags again. The space is still there. 
    Peter Grainge
    Community Expert
    Community Expert
    July 6, 2020

    I think it is a bit of trial and error now.

     

    First import the working topic into your original project and see if it still works.

     

    If it does, then copy from the original the text to a few words before the problem and paste into the imported topic. Do the same with text after. Then manually finish the remaining words.

     

    Assuming that all works, delete the original topic. Otherwise tell us how far you got.

     

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Inspiring
    July 6, 2020

    Yes, it does work in a new project.