Jump to content

Formatting issues in new pages field


Go to solution Solved by Jim M,

Recommended Posts

I have recently added a new field to my articles in pages. Basically I use the record field (body) to display a teaser of the article and then I have a second field for exclusive content which is only visible to subscribers. It's working perfectly (thanks @opentype 👍) except for one small problem.

The two fields seem to be formatting text in different ways.

The main body is formatting normally, but the exclusive content is giving me two lines between paragraphs rather than one. The html is different in both fields. In the second field it shows <p> </p> as it does in the record content field, but it also has 

<p>
    &nbsp;
</p>

which is causing the extra line between paragraphs. Is this a setting that needs changing or will it require a template edit to solve it? And if so how would I do it?

Link to comment
Share on other sites

Thanks Marc

Database is articles.

Field names are 'body' and 'exclusive content2'.

See below for examples. Both of these were pasted from the same document and not edited. The first one (body) shows up correctly, but the second one shows the double line spacing.

 

body field

Could contain: Page, Text, Letter

 

Exclusive content2 field

 Could contain: Page, Text, Letter

Link to comment
Share on other sites

I've tried it from different sources and I have always done them both the same way in both editors. 

I have done it from articles on my own site (converting an exiting article into the new split article), and also from applications such as text edit. I have copied the entire piece of text and posted in both boxes before editing out the bits I don't need from each, and I have done it by copying the text I need for the body and pasting that, and then going to get the text I need for exclusive content and pasting that the same way.

Regardless of how I do it I get the same result every time. Body field formats normally, but exclusive content adds the extra line.

Edited by tlw1999
Link to comment
Share on other sites

7 minutes ago, tlw1999 said:

I've tried it from different sources and I have always done them both the same way in both editors. 

I have done it from articles on my own site, and also from applications such s text edit. I have copied the entire piece of text and posted in both boxes before editing out the bits I don't need from each, and I have done it by copying the text I need for the body and pasting that, and then going to get the text I need for exclusive content and pasting that the same way.

Regardless of how I do it I get the same result. Body field formats normally, but exclusive content adds the extra line.

Humor me here...

Use the 'Source' of your editor when you are copying and paste it using 'Source' as well.

Edited by My Sharona
Link to comment
Share on other sites

Just done that, and this is interesting.

I took the same few paragraphs of text and posted them in three different fields - teaser paragraph, body and exclusive content.

Looking at the source all three were the same. When I posted the article, the first and third fields showed the double line spacing, the middle one (body) showed it the way it should be. 

When I checked the source again, they're still showing the same.

Edit: I copied from an external text document and not from an already published article on my site. I will try again doing that.

Edited by tlw1999
Link to comment
Share on other sites

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Link to comment
Share on other sites

So copying the source from an existing article and posting it into a new one brings up the same result.

One space between the lines in 'body' and two in 'exclusive content'.

4 minutes ago, Marc Stridgen said:

We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. 

We look forward to further assisting you. 

 

Updated the admin password for user cp so should be working for you now, Marc.

Link to comment
Share on other sites

Could you please switch to an unmodified template for the record display of your article here? Unfortunately, in the source of an article I created, I am not seeing this spacing but am seeing it on the display so just want to check if this is related to the template or not.

Link to comment
Share on other sites

3 hours ago, Jim M said:

Could you please switch to an unmodified template for the record display of your article here? Unfortunately, in the source of an article I created, I am not seeing this spacing but am seeing it on the display so just want to check if this is related to the template or not.

Not quite sure what you mean Jim. I don't think I have any other templates, or if I do I do not know how to post an article in one.

The 'body' field (the one which is showing everything as it should be) is an unmodified field. The 'exclusive content2' field is one I created using the same specs as the body field. The only thing that is different is I removed {value} as otherwise it would show in the preview and I need that to be hidden. Aside from that they seem to be the same.

The 'teaser paragraph' was a field I created too, and that also does not display properly.

Link to comment
Share on other sites

1 minute ago, tlw1999 said:

Not quite sure what you mean Jim. I don't think I have any other templates, or if I do I do not know how to post an article in one.

The 'body' field (the one which is showing everything as it should be) is an unmodified field. The 'exclusive content2' field is one I created using the same specs as the body field. The only thing that is different is I removed {value} as otherwise it would show in the preview and I need that to be hidden. Aside from that they seem to be the same.

The 'teaser paragraph' was a field I created too, and that also does not display properly.

You are using a custom Pages template for the Database record. You would need to switch that to an unmodified template. This setting is in ACP -> Pages -> Databases -> Edit your database -> see the drop-downs under the  "Templates" heading. You will then need to see in ACP -> Pages -> Templates, what your unmodified templates are called then switch to these.

Link to comment
Share on other sites

Unfortunately, your "Display Template Group" is still set to a modified template. You may wish to change all 3 groupings  there to unmodified templates if there is any confusion. As the next step for us would be to troubleshoot this along the path and would need this anyway.

Link to comment
Share on other sites

10 minutes ago, Jim M said:

Unfortunately, your "Display Template Group" is still set to a modified template. You may wish to change all 3 groupings  there to unmodified templates if there is any confusion. As the next step for us would be to troubleshoot this along the path and would need this anyway.

I did change, and I disabled the supergrid plug in too. Then when I saw it didn't make any difference I reverted back again.

Happy for you to go in and do what you need to. I won't touch anything until after you've been in and done what you need to.

Link to comment
Share on other sites

  • Solution

Finally found it, it looks like the category also had it's own configured template. Once I switched that to an unmodified template, everything is working as it should and this formatting is not an issue. Thus, this is an error with the SuperGrid templates that you're using and you will need to contact the author for further assistance.

I would advise setting these to use the default selection in the Database rather than their own individual template. Just to avoid any confusion later on.

I have also restored this back to the SuperGrid template.

Link to comment
Share on other sites

On 11/7/2022 at 4:44 PM, tlw1999 said:

In the second field it shows <p> </p> as it does in the record content field, but it also has 

<p>
    &nbsp;
</p>

Where? In the generated page or in the field when you use the SOURCE mode?

I’m with My Sharona: those extra line should be in the field content itself. SuperGrid just defines the layout of the page. It doesn’t change the content of fields. 

Link to comment
Share on other sites

4 hours ago, opentype said:

Where? In the generated page or in the field when you use the SOURCE mode?

I’m with My Sharona: those extra line should be in the field content itself. SuperGrid just defines the layout of the page. It doesn’t change the content of fields. 

It is the output in the template which is the problem. The template is not encasing the output in the correct editor CSS classes so respective settings for the editor are not respected for paragraph line breaks. 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...