eZ Platform Discussions

Custom tag - 2.3 to 2.4, Error on save


#1

Following the upgrade from version 2.3 to 2.4 I have a custom_tag that no longer works.

        advertising:
            template: 'MyBundle:fields/ezrichtext/custom_tags:advertising.html.twig'
            icon: '/bundles/ezplatformadminui/img/ez-icons.svg#blog'
            attributes:
                title:
                    type: 'string'
                    required: true
                    default_value: "advertising"
                zone_id:
                    type: 'number'
                    required: true
                mobile:
                    type: 'choice'
                    choices:
                      - "both"
                      - "mobile"
                      - "desktop"
                    default_value: 'both'
                    required: true
                promotional_skin:
                    type: 'choice'
                    choices:
                      - ""
                      - "promotional_skin"
                      - "hide"
                    default_value: ''

When I click on the “Save” button of the custom tag I have this error in the console of my browser (firefox):

Error: Permission denied to access property "nodeType"[En savoir plus] 99d1470_alloy-editor-no-react-min_1.js:461:67
	deployCKEditor/</</CKEDITOR.dom.selection.prototype.getType<    http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:461:67
	removeAllRanges                                                 http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:479:407
	selectRanges                                                    http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:474:455
	unlock                                                          http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:469:359
	deployCKEditor/</</CKEDITOR.editor.prototype.unlockSelection    http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:456:148
	value                                                           http://localhost:35080/js/2b6ac61_part_1_ezBtnCustomTagUpdate_8.js:1:14295
	value                                                           self-hosted:975:17
	Qh                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:142:452
	invokeGuardedCallback                                           http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:143:135
	invokeGuardedCallbackAndCatchFirstError                         http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:143:226
	Vd                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:14:337
	zg                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:145:331
	Sg                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:145:494
	Va                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:15:123
	uc                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:16:208
	Xd                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:16:373
	ph                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:40:264
	tg                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:136:357
	te                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:25:80
	Nb                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:41:283
	interactiveUpdates                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:189:369
	Ye                                                              http://localhost:35080/js/b22ba31_react-dom.production.min_2.js:41:24
	Ye                                                              self-hosted:1019:17

Error: Permission denied to access property "nodeType"

Error: Permission denied to access property "nodeType"

Erreur dans les liens source : request failed with status 500
    URL de la ressource : http://localhost:35080/js/2b6ac61_part_1_ezBtnCustomTagUpdate_8.js
    URL du lien source : ezBtnCustomTagUpdate.js.map[En savoir plus]

The strange thing is that sometimes it works. The bug is not systematic.

If I edit an old content that already had this custom tag it is not displayed the same…
( Yellow border, `content’ mode under the field view. )
But they are functional.


#2

Hello Rémy, I’ve asked someone to have a look at this. You should get a reply soon.


#3

Hello @robinmuilwijk, Thank you for calling.

I still have my mistake.
Here are some details:

On FireFox.
I open a content in edit mode.
I insert my custom_tag.
When you click on “Save”:

Error: Permission denied to access property "nodeType" [99d1470_alloy-editor-no-react-min_1.js:81:31](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js)

deployCKEditor/</CKEDITOR.dom.node [http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:81:31](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js) 
deployCKEditor/</</CKEDITOR.dom.selection [http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:458:137](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js) 
deployCKEditor/</</CKEDITOR.editor.prototype.getSelection [http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:455:319](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js) 
p [http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:597:178](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js) 
r [http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:596:491](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js) 
a/>/d> [http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js:588:46](http://localhost:35080/js/99d1470_alloy-editor-no-react-min_1.js)

image

It works on chrome… :thinking:


#4

I’ll ask around, thanks for sending the reminder!