Jump to content

[SOLVED] Field editor not showing anything


aagd
 Share

Recommended Posts

Just had a wierd experience with a local copy of a site, that all over sudden had problems with opening the field editor. The online copy still works normal. The problem seemed to be related to a JSON parsing problem, but I do not understand why it worked just normal some minutes earlier and still normal on the live site. The Error looked like this:

1579609428_ScreenShot2022-02-26at19_33_30.thumb.png.cbc157b5934f4ebe07f75b71671bf237.png

The site runs on PW 3.0.183 and after reading Joss's thread I first tried updating to latest master, and also latest dev, but with no success. Since that error was thrown by InputfieldTextTags.js I looked at the tags that some fields had. Out of maybe 50 fields only 3 had tags, and one containing the letter "Œ". After removing the tags in the online version (where I could still edit the fields) and then reimporting the database, the error was gone. I suspect this is an encoding bug, because if I put the tag back in, the problem reappears. It seems to affect only certain server configurations, in my case my local MAMP setup. I tried several PHP versions 7.3.29, 7.4.21 and 8.0.8. seemingly without any difference.

Should I post this as a possible bug on github? Any hints how to drill down to the real reason of this behaviour would be appreciated...

Edit 2022-02-27: Seems like the tag input is missing a sanitizer or it's not properly configured. The interface of the "Manage Tags" dialogue (Fields Overview) says "Any combination of letters (a-z), numbers (0-9) and underscores (no spaces)." but I can still enter umlauts and other characters that can break the UI. Even capital letters might not be allowed!? The Tags input in the field settings, doesn't mention those limitations.

 

Link to comment
Share on other sites

1 hour ago, AndZyk said:

I thought that it would have something to do with the language pack, but I think it was a caching issue because nowadays this error didn't occur to me anymore.

I read through the thread you posted and tried out a couple more things. I tried 3 different browsers (Chromium, FF, Safari), cleaned browser & completely removed all PW caches – all browsers are showing the same error. The site is a multilanguage (DE, EN, FR) site with German as default. Locally I can simply trigger the error by adding a tag with an umlaut, and removing the tag removes the error. New insight: switching to English also helps, French no. ? On the live site the field editing works well with umlaut tags in German and English, but still not in French. ?

I somehow suspect the server configuration might matter as well. Maybe JSON functions in MySQL or PHP? My local MySQL is 5.7.34 (5.7.36 on live), and PHP 7.3.29 (7.3.31 on live). In the MySQL changelog are mentioned some JSON fixes in 5.7.35 and 5.7.36, but right now it's too time consuming for me to test this properly.

Link to comment
Share on other sites

Yeah it is a strange error. Clearing the browser cache also didn't work for me. On our webhoster I had no error but on my local MAMP server.

Either the error was gone after a MAMP upgrade or it was a server cache issue. But I think eventually the error will go away. ?

Link to comment
Share on other sites

On 2/27/2022 at 8:18 AM, aagd said:

The interface of the "Manage Tags" dialogue (Fields Overview) says "Any combination of letters (a-z), numbers (0-9) and underscores (no spaces)." but I can still enter umlauts and other characters that can break the UI.

I can reproduce the issue. Please open a GitHub issue so that Ryan can investigate.

As you say, there seem to be two things needing attention:

  • The description for the Tags inputfield on the Advanced tab of Edit Field should state the range of characters that are allowed in a tag (umlauts and other accented characters are not allowed).
  • If a disallowed character is added via that Tags input it should be sanitized out to avoid breaking InputfieldTextTags. Disallowed characters are already sanitized out when adding a tag via Manage Tags > Add new tag.
  • Like 3
Link to comment
Share on other sites

  • 1 month later...
  • aagd changed the title to [SOLVED] Field editor not showing anything

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...