We are using Q&A Pro 1.2.7 (purchase code dfc68887-7341-4068-aaf2-8fa5fd509cfd) at https://www.linux-community.de/fragen/ (WordPress 5.8) and renewed support via Envato today.
We have been using this plugin for at least two years without any issues. Just recently we discovered that paragraphs from questions and answers are suddenly getting lost on save, with no apparent changes to configurations etc. on our side.
The problem persists if we deactivate all other plugins while using the default theme Twenty Twenty-One. It’s unclear when exactly the first time this issue occured, could be a couple of weeks or even months. Before that, everything was working fine. So we’re assuming this problem is caused by either one of the recent WP updates or an update of the Q&A plugin.
Posting something like this:
<p>first paragraph text</p>
<p>second paragraph text</p>
<p>third paragraph text</p>
will lead to this in the database after the first save (<LF> = line feed):
first paragraph text<LF>second paragraph text<LF>third paragraph text
which then will lead to this output:
<p>first paragraph text<br>
second paragraph text<br>
third paragraph text</p>
Usual TinyMCE behaviour leads to two <LF> in the DB at the end of a paragraph, so questions or answers posted before the issue all look like this:
first paragraph text<LF><LF>second paragraph text<LF><LF>third paragraph text
Which would then lead to the original paragraphs entered in the form.
Strangely enough, this correct behaviour is still working when creating standard posts at /wp-admin/post-new.php. Also, if you are switching between visual and text-only view there, you won’t see any <p> markup; they instantly get replaced by line feeds.
When creating questions or answers though, <p> markup is visible in the text-only view, whichs seems tied to this issue; this is also happening right here at your support form btw, and I doubt this is the correct behaviour. Moreover, if you are using the text-only view, any line breaks entered there are completely removed when switching back to visual mode! This is also not the case when using the standard post editor.
Any help would be greatly appreciated, as we have tried several workarounds with custom actions and filters, but to no avail.
As you can see, you have the exact same problem here. I had several paragraphs in my question, now they are all converted to one <br>.
Please login or Register to submit your answer