0

I try to create an own editor for the page panel on the right side. For this I use at beginning the HTML-Editor. This will work so far. After this I tried to adapt it for my package but I'll get always the error from requirejs:

Error: Script error for: My.Package/Inspector/Editors/MyEditor 
http://requirejs.org/docs/errors.html#scripterror

For two days I tried to find out where the error starts, but fail. Is this warning in the documentation the reason?

Adding editors and validators is no fixed API yet, keep an eye on the changelogs if you use this.

To reproduce the error do the following:

  • Using TYPO3 Neos version 1.1.0
  • Create a package named "My.Package"
  • Copy the HTMLEditor to Packages/Application/My.Package/Resources/Public/JavaScript/Inspector/Editors/MyEditor.js
  • Define Settings.yaml and NodeTypes.yaml

Settings.yaml:

TYPO3:
  Neos:
    userInterface:
      # Register editor
      requireJsPathMapping:
        'My.Package/Inspector/Editors': 'resource://My.Package/Public/JavaScript/Inspector/Editors/'

NodeTypes.yaml:

'TYPO3.Neos.NodeTypes:Page':
  properties:
    settings:
      type: string
#      defaultValue: '<p>Enter HTML here</p>'
      ui:
        label: 'Settings'
#        reloadIfChanged: TRUE
        inspector:
          group: 'layout'
          editor: 'My.Package/Inspector/Editors/MyEditor'

The expected behaviour should be to display the property "Settings" after "Layout for subpages of this page" followed by a button like at the HTML content element.

user2513437
  • 155
  • 10
  • Everything above is correct and I've tested it on same neos version. This error means that file could not be found/opened so: 1. Flush cache with force 2. Ensure your path is added `./flow configuration:show --type=Settings | grep -3 requireJsPathMapping` 3. Ensure that your MyEditor.js has correct rights (chmod) and if it's in correct directory (case sensitive) `http://your.neos/_Resources/Static/Packages/My.Package/JavaScript/Inspector/Editors/MyEditor.js`. – k.tarkin Oct 22 '14 at 11:33
  • CRAZY!!! My vendor name is blocked by the AdBlocker. I have already changed it a time ago with another letter, but now its blocking again! W-T-F! sorry :) – user2513437 Oct 22 '14 at 12:25

1 Answers1

0

The answer to this question is, that your example worked the way it was stated, but you had an ad blocker that blocked the request to your custom editor script.

Christopher
  • 106
  • 3