modmore / ClientConfig

ClientConfig is a MODX Revolution Extra to allow clients to maintain settings in a user friendly way.
https://docs.modmore.com/en/Open_Source/ClientConfig/index.html
MIT License
28 stars 27 forks source link

ClientConfig type ACE #180

Open OlegShchavelev opened 4 years ago

OlegShchavelev commented 4 years ago

Hello, Mark

When changing the type of the field from textarea to ace, the application simply stopped working. I show in the screenshot.

изображение

I show the ACE package of the latest version in the screenshot

изображение

ACE Settings

изображение

изображение

https://i.imgur.com/odhKlQv.png изображение

Environment

ClientConfig 2.3.0 , MODX 2.7.2 и PHP 7.2.25

sebastian-marinescu commented 2 years ago

Hi @OlegShchavelev just curious: did you fix it or find out what the problem was?

Ruslan-Aleev commented 1 year ago

Yep, I'm confirming bug. But problem in Ace:

focus_1 focus_2

sebastian-marinescu commented 1 year ago

Hi @Ruslan-Aleev, what versions are you running?

Because I cannot confirm it with either: MODX 2.8.5-pl, Ace 1.9.3-pl, ClientConfig 2.3.3-pl nor with: MODX 3.0.2-pl, Ace 1.9.3-pl, ClientConfig 2.3.0-pl

Both are working for me:

image

sebastian-marinescu commented 1 year ago

Maybe it needs the system-setting to be also set to Ace?

image

Ruslan-Aleev commented 1 year ago

@sebastian-marinescu Hi! It's really weird =) I took up the question, since the problem was reported in the telegram chat, I checked the ClientConfig and the problem also happened to me.

I have: MODX 2.8.5-pl, Ace 1.9.3-pl (but Ace installed from modstore.pro), ClientConfig 2.3.3-pl

image

Not only that, I even found a solution =) but now it's not clear why you don't have a problem...

Solution: in /assets/components/ace/modx.texteditor.js somewhere near the line 232, replace the code with:

focus: function (){
    this.valueHolder.focus();
},
Ruslan-Aleev commented 1 year ago

@sebastian-marinescu I installed clean MODX with git, did not do any MODX settings, I installed only 2 components Ace and ClientConfig from the modx.com repository. I created a group and a code-setting in ClientConfig - the problem is reproduced (checked in the latest Google Chrome, in incognito mode) ...

Ruslan-Aleev commented 1 year ago

@sebastian-marinescu So it looks like we've found a way to reproduce the bug - make the ace-setting first in the group; refresh the page and ClientConfig section will crash with an error in the console.