Tobias Hartlehnert
asked 3 weeks ago

We are using Q&A Pro 1.2.7 (purchase code dfc68887-7341-4068-aaf2-8fa5fd509cfd) at (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.
Issue details
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.

1 Answers
Tobias Hartlehnert
answered 3 weeks ago

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>.

Tobias Hartlehnert
replied 3 weeks ago

Just installed the new version 1.3.1 which was released today. Still has all the issues described here.

Dominic Staff
replied 2 weeks ago

Yes, I sent and notified to our technical team about this issue, we are checking it.

Powered by DW Question & Answer Pro