Mastodon: Bug: unable to save site settings due to invalid markup error on unchanged fields

Created on 15 Jul 2019  路  7Comments  路  Source: tootsuite/mastodon

When attempting to change site settings and save, we are receiving the errors:

contains invalid HTML markup: 3:161: ERROR: Unexpected end tag : p
and
contains invalid HTML markup: 13:10: ERROR: Unexpected end tag : p

These errors occur on the "Server description" and "Custom extended information". These are the only text box fields with content.

These are not the fields that were changed. The only change that was made to the page before attempting to save was toggling a timeline preview checkbox.

I asked in the Discourse channel and was told to move my server description info to the "Short server description" field. This did not resolve the issue.

Our "server description" and "extended information" fields do include P tags, but they were not changed from the previous save, which obviously saved the HTML just fine.

ETA: we are running v2.9.2

troubleshooting

Most helpful comment

I understood what's going on here.

The description says _a single paragraph_, so the error message is wrong: it's not that the p is not closed, but that you've been using a closingp tag (and p cannot wrap into p).

If you revise your description (that will be used in the API, but not appear in the Web interface -- for this you should use the _Custom extended information_ field) to only span one paragraph, it will work.

For example:

  1. Move your old multi-paragraph description to the _Custom extended information_ field.
  2. Describe your instance in a single paragraph (you may include <br> and other HTML tags) without using an opening <p> or a closing </p> since the description will be wrapped.

Actually @Gargron mentioned this tersely elsewhere (https://github.com/tootsuite/mastodon/issues/10532#issuecomment-481733644) (but since the search engine brought me here, this should be helpful to others):

All 7 comments

Also affected on two instances.

You have invalid markup in there and had it the whole time. You should fix it because it may be breaking the layout of the pages it's displayed on in unexpected ways.

Are P tags themselves invalid markup in Mastodon? I tried to save it with the only HTML being open and closing P tags in the description and this is what I'm getting:

ptagerror

That's the same experience I've had. It seems to affect P tags, I've checked through and it all seemed to be valid HTML.

Maybe does this help? -> https://github.com/tootsuite/mastodon/issues/10532#issuecomment-481733644

By the way, is this server description used anywhere on earth? -> #10611
On the server (instance) where I live, the admin decided to comment out the whole "server description" temporary because it causes the P tag error and it can be seen nowhere on our Mastodon website.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I understood what's going on here.

The description says _a single paragraph_, so the error message is wrong: it's not that the p is not closed, but that you've been using a closingp tag (and p cannot wrap into p).

If you revise your description (that will be used in the API, but not appear in the Web interface -- for this you should use the _Custom extended information_ field) to only span one paragraph, it will work.

For example:

  1. Move your old multi-paragraph description to the _Custom extended information_ field.
  2. Describe your instance in a single paragraph (you may include <br> and other HTML tags) without using an opening <p> or a closing </p> since the description will be wrapped.

Actually @Gargron mentioned this tersely elsewhere (https://github.com/tootsuite/mastodon/issues/10532#issuecomment-481733644) (but since the search engine brought me here, this should be helpful to others):

Was this page helpful?
0 / 5 - 0 ratings

Related issues

selfagency picture selfagency  路  3Comments

almafeta picture almafeta  路  3Comments

golbette picture golbette  路  3Comments

Lewiscowles1986 picture Lewiscowles1986  路  3Comments

hidrarga picture hidrarga  路  3Comments