I created a custom module which creates a content type (FAQs) with a paragraph field whose type is FAQ Item (with 2 fields, title and text).
After installing the module, I have a new content type as expected.
I add this new content type (which works), but when I want to add more paragraphs, I get this error.
edit start
↵An AJAX HTTP error occurred.↵HTTP Result Code: 200↵Debugging information follows.↵Path: /node/add/faq?ajax_form=1↵StatusText: OK↵ResponseText:
edit end
Is there any missing configuration the module should provide?
The YAML files are inside faq/config/optional. They have been created from the UI on another site and exported.
edit 2 start
My module files and structure
.info.yml file I have basic info link name, type, description, core_version_requirement and package.
.libraries.yml Am importing a JS file, inside "src-js"
.module is empty, without any php code.
.routing.yml also have basic stuff:
faq:
path: '/faqs'
defaults:
_controller: 'Drupal\faq\Controller\GetFaqController::getFaq'
_title: 'FAQs Page'
requirements:
_permission: 'access content'
Inside config-optional folder I have my YML to create content type, fields and paragraph. Those .yml files I exported from another website where I create all of this and deleted "uuid" line.
Then in my controller I also have basic stuff (for now).
class GetFaqController extends ControllerBase {
public function getFaq() {
echo '<h1>FAQs</h1>';
return [
'#title' => 'test'
];
}
}
This is my module structure/files.
Have very basic configs, that's why I am a bit lost with this error and what I search online I found same error but it is not related.
It seems something is missing with paragraphs and ajax request to add more.
edit 2 end
edit 3 start
I have created another module, this new module only creates a paragraph type with 2 fields (title and text), then I add manually this paragraph to "Article" content type and I get same error.
Another thing I have notice, in a clean drupal site with paragrpahs module installed, when I create a paragraph type manually via backoffice and then add it to any content type works correctly, when I install my module all paragraphs fields stop working and give this error.
If I uninstall my module and delete paragraph type created by my module, other paragraphs type start working again.
Here a repository of my custom module if someone want to test.
https://gitlab.com/drase15/custom-module
edit 3 end
/admin/reports/dblog
for some first debugging info