Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2015 01:53 PM
I'm trying to extend an existing .post.json.js javascript controller. I've done this successfully with share-header.get.js by using a module extension and now I want to add some additional "post" processing to the creation of a site. I've added a create-site.post.json.js file and the following module definition:
I've added the create-site.post.json.js to the directory /config/alfresco/site-webscripts/create-site inside my module's JAR file. The javascript in my create-site.post.json.js file doesn't seem to be running at all and yes, I've added it to the deployed modules list inside Alfresco.
I'm using Alfresco 5.0d. Does anyone know what I'm doing wrong? Is it even possible to add functionality to a post controller like you can a get controller?
<module> <id>Create Site Extension</id> <version>1.0</version> <customizations> <customization> <targetPackageRoot>org.alfresco.modules</targetPackageRoot> <sourcePackageRoot>create-site</sourcePackageRoot> </customization> </customizations></module>
I've added the create-site.post.json.js to the directory /config/alfresco/site-webscripts/create-site inside my module's JAR file. The javascript in my create-site.post.json.js file doesn't seem to be running at all and yes, I've added it to the deployed modules list inside Alfresco.
I'm using Alfresco 5.0d. Does anyone know what I'm doing wrong? Is it even possible to add functionality to a post controller like you can a get controller?
Labels:
- Labels:
-
Archive
1 ACCEPTED ANSWER
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 09:01 AM
I got asked to look into this thread and have done some debugging into it and it would seem that there is a bug in the way in which extension controller paths are looked up. Essentially what is happening is that Surf is looking for extension scripts with the name create-site.post.js and not create-site.post.json.js (note the missing .json).
The workaround to this problem is just to create your extension as create-site.post.js and that should then get processed.
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2016 01:57 PM
Wow, thanks!
It was a mystery for me.
Hyland Developer Evangelist
