Support Forum
MB Views seems to be broken, on a client's site whenever I add template code like
{% if total > 3 %}{# do something #}{% endif %}
it gets rewritten to
{% if total & gt; 3 %}{# do something #}{% endif %}
which obviously breaks the entire template and blanks out. Client does not know how long this has been going on.
Edit: had to edit this post because & gt; (but without the space) is shown as > here. In MB Views it is changed to the htmlentity.
Hello there,
Can you please let me know the steps to reproduce the issue? I'm just using the type Shortcode and putting your code to the post content and do not see any issue.
That's just it, it's on a live site. It just started happening after I was informed that a Twig template wasn't rendering, but I'm unable to edit it and troubleshoot because of this.
Here's what happens when I save a view (this isn't the view that's not working, but if I edit that one it will just mess it up more than it already is):
I have a similar behaviour for me this one is not working it shows both options, even if i have only one value (like WOHNEN) on the post, this is for all for item in X queries :
{% set backto = mb.rwmb_meta( 'nutzungsart', '', post.ID ) %}
{% for item in backto %}
{% if item == 'GEWERBE' %}
<div class="back-to-results">
<a href="/mietwohnungen-in-hagen/gewerbeobjekte/">Zurück zu allen Gewerbeobjekten</a>
</div>
{% elseif item == 'WOHNEN' %}
<div class="back-to-results">
<a href="/wohnungssuche-in-hagen/">Zurück zu allen Suchergebnissen</a>
</div>
{% endif%}
{% endfor %}
Hello,
I do not see that on my demo site, screen record https://monosnap.com/file/iQRdb11B2538YWhcrpZE93Q0SrwHqo
Can you please check this issue in a fresh install and the latest version of Meta Box and MB plugins?
Thanks for your reply. I have yet to hear back from my client. I asked him to create a staging copy of the site. I there disabled all plugins that I could but that didn't help. Something that didn't seem of importance was that it's a multisite environment. I asked him to assign me the role of super admin. After he did so, the problem went away.
This was Friday morning, I reported to the client about my findings but he has not replied yet. I mean to test the theory and have him strip away the extra privileges on staging, and grant me them on live. Was going to report back as soon as I knew more, but it's undetermined when that will be.
Okay, client replied, gave me super admin privileges on the network and without touching anything else I went straight into a demo view that I had used to isolate the problem (the view mention in the original initial post). I was now able to save the template without > being saved as & gt; withing twig brackets.
I was administrator before, super admin after. Seems like a bug for multisite only perhaps.