View Issue Details

IDProjectCategoryView StatusLast Update
15396Bug reportsOtherpublic2020-03-04 17:10
ReporterKRav Assigned To 
PriorityhighSeveritypartial_block 
Status newResolutionopen 
Product Version4.0.0-RC4 
Summary15396: Plugin-Settings - Json Editor is not working
Description

Plugin-Settings - Json Editor is not working - Console shows JS error.
The button for changing the view is not working. The Json string is not well formatted.

If you save the son format is destroyed

Steps To Reproduce
  • create a small plugin with settings type Json, by using this:

    protected $settings = [
    'workshopList' => [
    'type' => 'Json',
    'workshopList' => 'List Of workshops',
    'label' => 'Insert workshops',
    'labelOptions' => [
    'class' => 'col-md-12 plugin-settings__label'
    ],
    'controlOptions' => [
    'class' => 'col-md-12'
    ]
    ]

    ];

  • try to use the edit, to change the Json view

  • try to save and have a look at the result

TagsNo tags attached.
Complete LimeSurvey version number (& build)rc4xxxxxxxx
I will donate to the project if issue is resolvedNo
Browser
Database & DB-Versionxxxxx
Server OS (if known)
Webserver software & version (if known)
PHP Version7.0

Relationships

duplicate of 15485 new Plugin-Settings - Json Editor is not working 

Activities

KRav

KRav

2019-10-10 17:02

partner  

KRav

KRav

2019-10-21 10:11

partner   ~54128

The error seems to be gone in last version, but the editor is not working.

KRav

KRav

2019-10-21 15:14

partner   ~54131

'MyJson' => [
'label' => 'Insert point of time modules',
'type' => 'Json',
'moduleList' => 'List of modules',
'labelOptions' => [
'class' => 'col-md-12 plugin-settings__label'
],
'controlOptions' => [
'class' => 'col-md-12'
]
],

markusfluer

markusfluer

2019-10-22 11:55

administrator   ~54135

That's not json.
Json can only work with double quotes.

KRav

KRav

2019-10-22 15:51

partner   ~54143

.. yes... it's the settings-code of a plugin - sorry . try to help you, to set up an own setting. for testing

cdorin

cdorin

2019-10-25 11:51

manager   ~54216

Hey Kai, could you please provide more details in the bug report, as well as the necessary steps we need to take in order to be able to easily reproduce the plugin? Tried to take a look at it but don't really know from where to start.

KRav

KRav

2019-10-25 13:08

partner   ~54220

See above - steps to reproduce

DenisChenu

DenisChenu

2019-10-25 14:16

developer   ~54221

I think it's a issue with new ace configuration or version

Plugin used : https://framagit.org/Shnoulle/exampleSettings
See screencast /peek

Even after using included json editor, broken after save

Peek 25-10-2019 14-14.gif (771,268 bytes)
DenisChenu

DenisChenu

2019-10-25 14:16

developer   ~54222

@KRav : seems broken in 3.X too, no ?

KRav

KRav

2019-10-30 09:30

partner   ~54263

@DenisChenu. I don't know - I did no plugins for LS3

DenisChenu

DenisChenu

2019-10-30 09:58

developer   ~54266

OK, i report it for 3.X
But i never use json for my plugins. It's too complex for simple user … and when i relly need it ot's for question attribute

DenisChenu

DenisChenu

2019-11-02 10:34

developer   ~54343

If this one is immediate : related (for 3.X), https://bugs.limesurvey.org/view.php?id=15485
Must be done before …

Mazi

Mazi

2020-01-22 15:00

partner   ~55432

Last edited: 2020-01-22 15:00

View 2 revisions

@cdorin, this issue should be set to "block" because the issue with the editor is causing plugins to fail once JSON data gets saved a second time. Can someone look into this.

It has to be fixed for LS 3.x LTS as well.

Mazi

Mazi

2020-01-22 15:02

partner   ~55433

@cdorin, this pull request may already fix the issue: https://github.com/LimeSurvey/LimeSurvey/pull/1217

markusfluer

markusfluer

2020-01-22 15:56

administrator   ~55434

This is not really a blocking bug, as it is only relevant for plugin developers.
If you use the type text, you wil not have the developer sugar of linting, but it will work with clean json.

I will merge the PR as soon as i have time to test it.

DenisChenu

DenisChenu

2020-01-22 17:53

developer   ~55438

This is not really a blocking bug, as it is only relevant for plugin developers.

And plugin user …

Issue History

Date Modified Username Field Change
2019-10-10 17:02 KRav New Issue
2019-10-10 17:02 KRav File Added: Bildschirmfoto 2019-10-10 um 16.58.43.png
2019-10-21 10:11 KRav Note Added: 54128
2019-10-21 15:14 KRav Note Added: 54131
2019-10-21 16:35 KRav Description Updated View Revisions
2019-10-22 11:55 markusfluer Note Added: 54135
2019-10-22 15:51 KRav Note Added: 54143
2019-10-25 11:51 cdorin Note Added: 54216
2019-10-25 13:08 KRav Steps to Reproduce Updated View Revisions
2019-10-25 13:08 KRav File Added: Bildschirmfoto 2019-10-25 um 13.07.43.png
2019-10-25 13:08 KRav Note Added: 54220
2019-10-25 14:16 DenisChenu File Added: Peek 25-10-2019 14-14.gif
2019-10-25 14:16 DenisChenu Note Added: 54221
2019-10-25 14:16 DenisChenu Note Added: 54222
2019-10-30 09:30 KRav Note Added: 54263
2019-10-30 09:58 DenisChenu Note Added: 54266
2019-10-30 10:12 DenisChenu Relationship added duplicate of 15485
2019-10-30 10:39 KRav Priority none => immediate
2019-11-01 17:27 c_schmitz Category RC4 => Other
2019-11-02 10:34 DenisChenu Note Added: 54343
2020-01-22 15:00 Mazi Note Added: 55432
2020-01-22 15:00 Mazi Note Edited: 55432 View Revisions
2020-01-22 15:02 Mazi Note Added: 55433
2020-01-22 15:56 markusfluer Note Added: 55434
2020-01-22 17:53 DenisChenu Note Added: 55438
2020-03-04 17:10 cdorin Priority immediate => high