Skip to main content

Timeline for Custom module causes an AJAX error

Current License: CC BY-SA 4.0

22 events
when toggle format what by license comment
Jan 9, 2021 at 3:02 review Close votes
Jan 10, 2021 at 3:04
Jan 7, 2021 at 15:20 answer added Pedro timeline score: 0
Jan 6, 2021 at 16:05 comment added Pedro hey @Kevin I know I don't need .module file, but like I said, I start to cleaning up my module and leave only the .yml files to test it out
Jan 6, 2021 at 15:03 comment added Kevin It must be that Javascript file. You need to write it to conform to how Drupal in JS is added. You also don't need that .module file.
Jan 6, 2021 at 15:03 history edited Kevin CC BY-SA 4.0
deleted 13984 characters in body
Jan 6, 2021 at 11:18 comment added Pedro hey, if I disable the custom module everything works great, if I enable custom module error occur. JS file is being called on .libraries.yml file. I start cleaning my first module to try to find the error, at this moment my module only create a paragraph type with 2 fields based on .yml files under config-optional folder
Jan 6, 2021 at 4:06 comment added Kevin This is certainly weird gitlab.com/drase15/custom-module/-/blob/master/src/js/… but I don't see anything loading that JS file anyway. You need to start by disabling this module, and seeing if the error still occurs. If it does, it could be a contributed module.
Jan 6, 2021 at 3:38 comment added Kevin This question can never be answered because it's too vague. You could have an error in the code that creates the fields or paragraphs, the routing YAML above is indented improperly and the controller has an echo in it for starters. Disable all these custom modules and clear the cache and see if the problem persists.
Jan 5, 2021 at 16:40 history edited Pedro CC BY-SA 4.0
added 596 characters in body
Jan 5, 2021 at 16:27 comment added Pedro hi @DavidThomas have tried but still not working, also I create another module, but a little more simple, only create a paragraph type and fields, then add manually this paragraph to "Article" and got same error
Dec 24, 2020 at 9:26 comment added David Thomas Try without the direct “ echo '<h1>FAQs</h1>';” in your controller. Also check if it is ok in a different browser, eg not chrome. Any change?
Dec 23, 2020 at 13:28 comment added Pedro hey @leymannx I have disabled JS/CSS aggregation and cache. Also added more information about my module structure and files
Dec 23, 2020 at 13:26 history edited Pedro CC BY-SA 4.0
added 1315 characters in body
Dec 23, 2020 at 12:22 comment added leymannx Since you are developing, you'd definitely switch off JS/CSS aggregation and cache. And without seeing the custom module and the exact code you used to create the content type and paragraph types it's probably more like finding the needle in a haystack, sorry.
Dec 23, 2020 at 12:16 history edited leymannx CC BY-SA 4.0
deleted 2 characters in body; edited tags
Dec 21, 2020 at 13:41 comment added Pedro @Hudri I don't get any message under "recent log messages", paragraphs module use ajax when adds another item, but the ajax is not working (for some reason idk), it is nothing to do with "server side"/php, I think is kind of backoffice "client side" :/
Dec 21, 2020 at 13:11 comment added Hudri The Ajax error message is often not really helpful. Try taking a look at Reports > recent log messages under /admin/reports/dblog for some first debugging info
Dec 21, 2020 at 10:42 review Close votes
Dec 23, 2020 at 12:16
Dec 21, 2020 at 10:15 history edited Pedro CC BY-SA 4.0
added 14177 characters in body
Dec 18, 2020 at 19:02 comment added avpaderno It would help if the error message were completely quoted, not shown in a screenshot.
Dec 18, 2020 at 19:01 history edited avpaderno CC BY-SA 4.0
removed tags from the title
Dec 18, 2020 at 17:26 history asked Pedro CC BY-SA 4.0