Output Text Area Field (CK Editor) Additional Closing - P-Tag
text-area field with CK Editor
I don't think this exactly matches the problems discussed, but you certainly get an unexpected output in the front end code which may lead to some confusion.
It was when proof reading the output code that I noticed some slightly strange behaviour when echoing the "text/area" field in an install v3.0.61 and validating the code.
This practice allows an opportunity to catch any typos or other mistakes, like forgetting to close a "div" etc. It also helps to see how the browser parses and interprets the code too. A code editor also helps, but my human error still can cause a problem.
As most web browsers show some validation in the source (typically ctrl+u) of the web page this is an easy way to have a quick look to see if all the nesting of html elements is correct or not. In doing this it was proving difficult to locate an erroneous " </p> " tag (potential errors usually show in red).
Here is the Error:-
There appears to be an additional closing P-tag if you enclose the text area output, such as the "$page->body" in a P-tag i.e. <p> <?= $page->body; ?> </p>.
This is not good practice and the simple remedy when using CK Editor to parse the data in the text/area is to use a "<div>" or no element at all.
Processwire rarely (if ever) errors, so it seems CK Editor may be the culprit for adding an unwanted closing P-Tag?
Hope this helps.