I have a view that tries to display a custom field within one of my posts. Here is the code I use in the "Loop items in" section of the view editor:
<div class="tsv-loop-item">
<div class="tsv-featured">[wpv-post-featured-image]</div>
<div>
<h2 style="margin-bottom:0;padding-bottom:0;"><span class="tsv-title">[Ep [types field="ep"][/types]] [wpv-post-title]</span></h2>
<p class="tsv-author">[wpv-post-date format="M j, Y"] | [wpv-post-taxonomy type="guest" format="link"]</p>
<p class="tsv-excerpt">[wpv-post-excerpt length="20" count="word" format="noautop"]</p>
</div>
</div>
Everything is fine when I save the code, and the view works correctly. However, if I go back to the view later to make other edits, the moment I load the view, the code above is changed. The section that says
[Ep [types field="ep"][/types]
is changed as follows:
[Ep [types field='ep'][/types]
Obviously, for whatever reason, your code is escaping my quotes and replacing them with the ''' code.
The problem is, when I save the view back with this text, the display on the front end is all wrong--the content of the "ep" field is left blank. I can work around the problem by reloading the view, changing the ''' entries back to double quotes, and saving the result. But if I subsequently reload the view, the conversion is made again.
This is a bug, and it needs to be fixed. Please get this fixed in your next release.
Thank you.
LOL, when I tried to explain the problem, the editor on THIS page screwed up my text! Let me try again using your special formatting instructions...
I have a view that tries to display a custom field within one of my posts. Here is the code I use in the "Loop items in" section of the view editor:
<div class="tsv-loop-item">
<div class="tsv-featured"><a href="[wpv-post-url]">[wpv-post-featured-image]</a></div>
<div>
<h2 style="margin-bottom:0;padding-bottom:0;"><span class="tsv-title"><a href="[wpv-post-url]">[Ep [types field="ep"][/types]] [wpv-post-title]</a></span></h2>
<p class="tsv-author">[wpv-post-date format="M j, Y"] | [wpv-post-taxonomy type="guest" format="link"]</p>
<p class="tsv-excerpt">[wpv-post-excerpt length="20" count="word" format="noautop"]</p>
</div>
</div>
Everything is fine when I save the code, and the view works correctly. However, if I go back to the view later to make other edits, the moment I load the view, the code above is changed. The section that says
[Ep [types field="ep"][/types]]
is changed as follows:
[Ep [types field=\'ep\'][/types]]
Obviously, for whatever reason, your code is escaping my quotes and replacing them with the
code.
The problem is, when I save the view back with this text, the display on the front end is all wrong--the content of the "ep" field is left blank. I can work around the problem by reloading the view, changing the
entries back to double quotes, and saving the result. But if I subsequently reload the view, the conversion is made again.
This is a bug, and it needs to be fixed. Please get this fixed in your next release.
Thank you.
For god's sake, this editor is ridiculous. The Toolset code that loads the view is changing my double quotes to the symbol 'ampersand' 'hasthtag' 039;.
Hello,
I have tried it in my localhost with a fresh WP installation + the latest version of Toolst plugins, it works fine, see my screenshot: escaping.JPG
So the problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again
3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
I have the latest toolset on my system. In fact, I have the latest versions of everything, so that is not the problem.
Disabling plugins isn't really an option here, because the same thing is happening on multiple websites which are all configured in a similar manner. I have a set of plugins that are common across all these websites, and a few differences here and there.
The problem occurs intermittently--i.e. it doesn't happen on every attempt to load the view into the editor. Still, it happens often enough that it can become irritating. As I said, if I see the problem then it is easy to fix, but I sometimes get so focused on something else I'm trying to fix that I don't notice it, and I don't make the correction...until later when I happen to notice the error on the front end of the website.
It might be a server issue, as I mentioned above, please get the PHP/JS debug logs from your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/