Skip Navigation

[Resolved] sidebar created in Layouts has error on only some posts of the same post type

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 14 replies, has 2 voices.

Last updated by Nigel 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1121010

I am trying to:

I have a Toolset Layout Single Page Template which displays a Sidebar.

Today I added 2 Toolset Views with Filters and there was a display error for only SOME of the posts, where the Sidebar displayed below all the content and in a narrow column.

Many display correctly, many do not. I cannot determine what is the difference between those that work and those that do not, however if they are all the same post type using the same template it does not seem to make any sense.

I use a nearly identical Template Layout for several different custom post types, and they all have the same random errors on only some of the posts. The Layouts have different sidebar for each post type, and a few other minor differences, but they use the same Cell Structure and Views.

I have tried;
- changing the View to Shortcode in a Visual Cell,
- changing the Cell structure,
- Inserting the Sidebar elements directly in the Layout instead of as a Sidebar,
- Recreating the Template from scratch and re-associating the post type with the new template

The problem is resolved when the Views are removed. Actually some of the posts are fixed removing one of the 2 views. I have tried checking the Views, however it works fine on most of the posts with both of the Views, so I cannot begin to determine what I can change that will help the random errors.

One possibility is the Content Template in one of the Views on the Sidebar is similar to one of the Views that "broke" the Sidebar. The Sidebar uses a revised version of the Categories Grid from the Toolset Reference Magazine Site, and the View that broke the Sidebar uses some revised code from just the Categories Grid Post List, only some of the code from the Content Template. I renamed the CSS classes to be different, and tried completely removing the CSS. However that does not effect the problem.

Also, there is NO content on any of these Posts at the moment. They are meant to be relational hubs for other post types, There is no data other than the Layout, Views, Relationships, Tags, and Title.

Link to a page where the issue can be seen:

Examples of same Post Type that displays with and without sidebar
"Place" CPT
Correct Display:
hidden link
hidden link
hidden link
Broken:
hidden link
hidden link
hidden link
hidden link

""Country" CPT (most of these seem to be working)
Correct Display:
hidden link
Broken:
hidden link

"City" CPT (...all of these seem to be broken)
hidden link
hidden link

"Continent" CPT (all of these seem to be working)
Correct Display:
hidden link
hidden link

I expected to see:

The Layout Template work the same on all of the same Post Types.

Instead, I got:

Errors on some posts while others display correctly.

Thanks for your help!

#1121012

Also...

"State" CPT
Correct Display:
hidden link
hidden link
Broken:
hidden link

#1121488

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot working.png
Screenshot broken.png

Hi Brent

I took a quick look at the page source for an working example (victoria) and a broken version (queensland).

You can hopefully see in the screenshots that in the working example, the sidebar (highlighted) is a sibling of the main content in the same row, whereas in the broken example the sidebar is a child of the main content.

The most likely explanation of that is something trivial like a missing </div> from some of the content on the broken pages.

That is where I would direct my search.

If you can't find anything I'll likely need a copy of your site to be able to install it locally and do my own testing.

hidden link

#1121516

Hello Nigel,

There is literally no content on the pages, just the Layout Template. That's why I cannot see any difference, and was focused on Cell Grids or Views.

I'm working on a copy, the site is pretty huge with 7K images, 2K posts.

Where do I send you the link?

Does the Duplicator act as a backup or I need to backup then run Duplicator?

Thanks,
Brent

#1121517
Layout for Single State - 1 of 2.png
Layout for Single State - 2 of 2.png

screenshots of layout

#1121550

The Duplicator failed because my site is 11GB. I'm trying the 2-step process, to create a zip of files then use Duplicator for the DB.

Wouldn't it be easier just login to the live site?

Alternatively I'll try All in One WP, which has worked in the past.

Also, maybe I can use the Module Manager to export all the elements at play? There are very few State posts. Not sure how the images work for Module Manager, but if the problem is replicated without them then they are not required for troubleshooting and we don't need to use giant full site files.

#1121602

Nigel,

I have a 12gb site file from All-in-One-WP, and setup an admin user account for you. Let me know how to send you download link (...and preference FTP vs Dropbox).

Brent

#1121606

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Brent

The filesize is presumably so large because of the uploads directory.

Could you re-create either the Duplicator or All-in-One WP Migration packages (I don't mind which) but exclude the media library at a minimum. If you are using All-in-One you can exclude post revisions etc. too.

Let me create a private reply so you can share the link and credentials.

#1122271

just noted same issue with the search archive

Correct Display:
hidden link
Broken:
hidden link

#1122704

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Brent

I installed a copy of your site and I can see the issue on the different posts, and I think it is almost certainly because of incorrectly formed tags somewhere.

To get a head start on that I used view-source in my browser to get the complete HTML from one of the problem pages and I pasted it into an HTML validator: hidden link

Sure enough it found a number of issues caused by things such as missing the one of the quotes where a custom class has been added etc.

It gives a detailed list of what errors are found where. Could you please try the same and try and identify what is behind the faulty markup in each case (bearing in mind that some of the first reported errors may have a cascade effect, and fixing those may fix the later errors, too).

If that doesn't get to the bottom of the cause let me know. I'll need to update my copy of your site with whatever fixes you make to be able to keep looking.

#1122945
HTML where the issues are occuring.png
FreeFormatter.com - Issues with good display (phi).png
FreeFormatter.com - Issues with broke display (2 of 2) (nha trang).png
FreeFormatter.com - Issues with broke display (1 of 2) (nha trang).png
FreeFormatter.com - Differing Issue on broke display (nha trang).png

Hello Nigel,

I've cleaned up the HTML but problem persists.

Focusing on the Search Archive, because there is only one view and the most simple Layout.
Correct Display:
hidden link
Broken:
hidden link

The HTML Issue that differs is:

Unclosed element “div”.
From line 301, column 17 to line 301, column 55
Code Extract:
<div class="ddl-full-width-row row " >↩

(...also the </main> error is on line 1253 for the correct display and 909 for broke display)

The remaining HTML issues are same on both versions:
1. missing img alt
2. Bad value “hidden link for attribute “rel” on element “link” (...what is this?)
3. unclosed elements within the <Main> (...these are not part of the Views or any settings I know how to edit)

I've attached screenshots of the Issues and the HTML code where unclosed divs occur. I do not know the source of this code in order to edit. It seems to be in Layouts or the Theme?

I've updated a new copy of the site on the same ftp server. ...I can send dropbox link.

Please take a look and let me know what I can try next.

Brent

#1123482

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Brent

Thanks for the detective work you've done so far.

Yes, could you share a link to the updated backup archive, and I can use that as the basis for trying to track down the problem itself.

(You can share links here and they are private by default—only you and the supporters can see them. You only really need a private reply for usernames & passwords.)

#1123486

Here's the link

hidden link

Thanks!

#1123896

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Brent

I've been chasing the cause of the issue on the updated copy of your site I have installed, but it is proving elusive, and its taking up more time than I'm supposed to spend on an individual thread, so I'm passing it up to my colleagues in second tier who can devote more time to it.

I'll keep you posted.

Thanks for your patience.

#1125322

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2018-10-11 at 15.17.27.png

Hi Brent

My colleague identified the issue as a missing </div> in the WordPress archives.

Go to Toolset > WordPress Archives and edit the search archive.

In the Loop Editor add a closing div tag for the pad-last section you can see in the screenshot.

I did that on my local copy of your site and it fixed the issue, let me know if you find otherwise.