Skip Navigation

[Closed] Views stops working when adding a class to my html

This support ticket is created 7 years, 7 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 3 voices.

Last updated by Shane 7 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#431357

I never expected a view to crash because i add a class (no matter what class, as long as it has a class) to my html object....

I have tested over and over, nothing breaks my view, except from when i add a class to my active link...

PLEASE HELP!!!!! (this issue happened on a production site).

#431490

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Thomas,

Thank you for contacting our support forum.

This is a strange issue and shouldn't be occurring. In order to ensure that this issue is being caused by our views plugin I would recommend that you temporarily disable all your non-toolset plugins and try again.

If the issue still remains please let me know.

Thanks,
Shane

#436050

Hi Shane, thanks for your support.

I dont even want to start a support thread - I am actually getting very tired of Views.
I think there is ALWAYS something that doesn't work, and somethings that should be done in a very unpractical and non-logical way.

I am starting to code everything myself, because it is ALOT LESS frustrating and faster instead of constantly asking for support. - unfortunately i had to open a new ticket because of a project that already uses WP-Types.

It was clearly a bug, that caused error on page rendering if i added a class to a element inside a foreach loop.

I dont want to waste anymore time on this issue to be honest, as i was forced to javascript my way out of it (very unprofessional solution, but it works).

Thank you as always for your support, but i have just come to that point where i am starting to give up.

#436053

Amir
Supporter

Thomas, I'm a bit lost. Could you possibly show us what edit you did which causes the View to crash?

When it crashes, can you show us what happens?

Obviously, we want to fix it, but it's very hard with the information that you've provided.

#436077
[wpv-post-body view_template='None']
[wpv-conditional if="( $(wpcf-presse-filer) ne '' )"]
<div class="table-responsive">
  <table class="table">
    <thead>
      <th>Filer:</th>
    </thead>
    <tbody>
      <tr><td>[types field="presse-filer" link="true" separator="</td></tr><tr><td>"][/types]</td></tr>
    </tbody>
  </table>
</div>
[/wpv-conditional]
[wpv-conditional if="( $(wpcf-presse-billeder) ne '' )"]
<div class="row clearfix grid-xs-2 grid-sm-4 grid-md-4 grid-lg-4">
  [wpv-for-each field="wpcf-presse-billeder"]
  <div class="col-xs-6 col-sm-3">
    <div class="col-inside text-center" style="margin-bottom:20px;">
      <div class="press-img" style="background-image:url([types field='presse-billeder' size='thumbnail' url='true' ][/types]);"></div>
      <p>
        <a href='[types field="presse-billeder" url="true"][/types]' class="btn btn-primary btn-sm"><i class="fa fa-download"></i> [wpml-string context="wpv-views"]Download[/wpml-string]</a>
      </p>
    </div>
  </div>
  [/wpv-for-each]
</div>
[/wpv-conditional]

Above view should theoretically work
But it doesnt..
If i remove the link (bootstrap button). it works.

When it dont work:
Everything below "Content" area of my page-template, will not get printed out (no footer, nothing).

And this is not because of some other plugin or the theme - as i know every line of the theme-code (i wrote it) and im running no plugins.

#436079

Amir
Supporter

You're talking about this link?

<a href='[types field="presse-billeder" url="true"][/types]' class="btn btn-primary btn-sm"><i class="fa fa-download"></i> [wpml-string context="wpv-views"]Download[/wpml-string]</a>

Can you paste here the exact change that causes this entire thing to fail?

In the original description, you said that it's adding a class. It would be great if you can paste two codes:
1. Working
2. Not working, with minimal change to cause it not to work

And, if the output just stops, there should be a PHP error in the log file. Can you check that error and tell us what it is?

To generate the PHP error log, you need to enable define('WP_DEBUG', true); and set the log file, as explained here:
https://toolset.com/documentation/user-guides/debugging-types-and-views/

#436849

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Thomas,

Just checking up on the this ticket.

Do you have any update for us so that we can get a better understanding of the issue ?

Looking forward to hearing from you soon.

Thanks,
Shane

The topic ‘[Closed] Views stops working when adding a class to my html’ is closed to new replies.