Saltar navegación

[Resuelto] Formatting issue after 1 item added

This support ticket is created hace 2 semanas, 4 días. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 2 respuestas, tiene 1 mensaje.

Última actualización por Bobby339 hace 2 semanas, 3 días.

Asistido por: Minesh.

Autor
Mensajes
#2814663
console.png
incorrect_spacing.png
correct_spacing.png

We are building a sales dashboard using Toolset that includes two views working together:
• A Lead View that displays a list of leads (custom post type: lead)
• A Notes View nested inside it (custom post type: note), filtered by the parent lead post

Each lead has an expandable/collapsible section that shows lead details, an inline note submission form, and a rendered list of previous notes (via the nested View).

Everything works and looks perfect except when the first lead in the list has at least one note — in that case, the vertical spacing between the 1st and 2nd lead becomes incorrect, introducing a large visual gap. The layout for all other leads renders cleanly when the first lead has no notes.

The Problem (visual behavior)
• If no notes exist for the first lead → spacing across all lead rows is perfect.
• As soon as one or more notes exist for the first lead, Toolset inserts extra spacing before the second lead, which appears as a large blank area.
• DOM inspection shows that rogue empty <p></p> tags are being inserted between .lead blocks, even though my Views and HTML include no paragraph tags.

What I’ve Tried (and ruled out)

We have systematically ruled out the following:
• Cleaned all Toolset Views of extra line breaks and tags
• Wrapped [wpv-view name="lead_notes"...] in <div>s and tried moving it to multiple locations
• Verified that CSS on .lead_note, .lead, .lead-notes-wrapper, and their parents is not introducing any spacing
• Replaced the [wpv-view] shortcode with a custom [lead_notes_clean] PHP shortcode that uses do_shortcode() and strips whitespace via preg_replace
• Used display: contents on wrapper divs to flatten block layout
• Used DevTools to confirm that the space is caused by empty <p></p> tags
• Attempted to remove them via JavaScript after page load (they are removed, but the spacing remains)
• Attempted to use [raw] shortcode (Toolset does not support it)
• Searched for and attempted to disable “Auto-insert paragraphs” in the View UI (this checkbox does not appear, likely due to custom layout usage)
• Attempted wpv_filter_wpv_view_shortcode_output to remove wpautop — this crashed the site
• Tested with and without custom shortcode, suppress_filters, and different loop types

What I Need Help With

I need Toolset support to help me:
• Identify why Toolset inserts rogue <p> tags or whitespace before/after the first nested view output
• Help me completely suppress automatic formatting or filtering on the nested lead_notes view
• Recommend a supported way to disable wpautop or shortcode_unautop specifically for this view

#2814706

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

That is really strange.

Can you please share problem URL and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2814775

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

With the "lead_notes" view that is your child view:
=> enlace oculto

Within the "Loop Editor" section, you added the shortcode as given under:

<wpv-loop>
[wpv-post-body view_template="loop-item-in-lead_notes"]
      	
</wpv-loop>

I've added the attribute suppress_filters="true" to above shortcode so it looks like as given under:

[wpv-post-body view_template="loop-item-in-lead_notes" suppress_filters="true"]

Can you please confirm it works as expected now.

#2814794

THANK YOU! I tried to implement uppress_filters="true" but I must have not done it correctly.