Problem/Motivation

The Freelinking filter doesn't appear to work under the Plain Text format; I can enable and configure it in the configuration for Plain text, but viewing a page with a Plain text textarea containing Freelinking markup results in the untouched markup being displayed.

It does work for me when using the Basic HTML format; and putting two textareas on a content type, one Plain text and the other Basic HTML, with the same text and markup in both fields results in the Basic HTML one getting the markup transformed to links as expected, while the Plain text one is displayed with unprocessed markup.

To reproduce:

  1. Add two textareas to a content type, one with the Plain text format and the other with Basic HTML;
  2. Add some text with valid Freelinking markup to one of the textboxes and copy/paste it into the second;
  3. Save the page and view it or click Preview

Comments

nmalinoski created an issue. See original summary.

mradcliffe’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

I wasn't able to reproduce. This is most likely because of the weights of the input filters in your text format.

If the “Display any HTML as plain text” filter is weighted below the “Freelinking” filter, then all HTML markup generated by Freelinking will be escaped into plain text. When “Freelinking” filter is weighted below, then the markup is rendered as HTML.

Example:

  1. Display any HTML as plain text
  2. Convert line breaks into HTML (i.e.
    and

    )

  3. Convert URLs into links
  4. Freelinking
nmalinoski’s picture

I'm running Drupal Core 8.8.5, with Entity Reference Revisions 8.x-1.8, Extensible BBCode 8.x-3.1, Freelinking 8.x-3.1, and Paragraphs 8.x-1.11. I created a Paragraphs type "Entry" with two fields, one Text (plain, long) and one Text (formatted, long), and I added a Paragraphs field to a content type.

The filter weights for Plain Text are already as you recommend--with Freelinking last, after "Display HTML as plain text". Both Plain Text and Basic HTML are defaults plus Freelinking, with Freelinking weighted last, with only Node Title enabled, and only enabled for the content type on which these fields appear.

Even with that, the Freelinking filter doesn't appear to be running at all, so whatever markup I enter into the textbox comes out just as I entered it. If I enter something like "Link to [[Page 2|this page]]." in both text fields, the resulting page displays "Link to [[Page 2|this page]]." for the plain text field, and the Basic HTML field gets "Link to this page" with a clickable link.

mradcliffe’s picture

Thank you for the additional info.

Just a note, a field that has the type labelled by "Text (plain, long)" will never have a text format applied to it (unless programmatically done). The text format isn't stored with the text.

I tried to replicate first by only adding Paragraphs. I created a paragraph type, added a Text (fromatted, long) field to it, added a entity reference revision for Paragraph to the same content type. When I created content I added a new paragraph item, and pasted the same text that was working, and saved.

I didn't see the text show up at first, but after resaving the content type manage display, it showed up and rendered fine.

I then enabled and added XBBCode to the filter, putting it right above Freelinking. I thought that might interfere with things, but it didn't. The text was still displayed. Both worked together without an issue.

I'm not sure what's going on with your site's configuration that could be causing any issues.

mradcliffe’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)