Expand my Community achievements bar.

SOLVED

Error in saving content fragment after editing

Avatar

Level 3

Hi Team,

While editing my content fragment i am getting error pop up after saving it.

skumari_0-1689926815473.png

 

From the system console i have got the following error. Its not happening for all fragment but few one.I have compared the crx structure with other which is working fine but didn't get any clue.

Below errors i am getting from error.log

21.07.2023 03:56:18.070 *ERROR* [10.182.61.88 [1689926178027] POST /content/dam/content-fragments/caas/bookpedia/author1.cfm.content.json HTTP/1.1] com.adobe.cq.dam.cfm.impl.servlets.ContentPostServlet No element '=By proceeding, you confirm you are authorised to provide us with the following information' defined
com.adobe.cq.dam.cfm.impl.servlets.ContentPostServlet$UpdateException: No element '=By proceeding, you confirm you are authorised to provide us with the following information' defined
	at com.adobe.cq.dam.cfm.impl.servlets.ContentPostServlet.updateMultipleElements(ContentPostServlet.java:463) [com.adobe.dam.cq-dam-cfm-impl:0.11.112]
	at com.adobe.cq.dam.cfm.impl.servlets.ContentPostServlet.doPost(ContentPostServlet.java:228) [com.adobe.dam.cq-dam-cfm-impl:0.11.112]
	at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.22.0.B002]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.22.0.B002]
	at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.22.0.B002]
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:579) [org.apache.sling.engine:2.7.10.B0004]
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.10.B0004]
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) [org.apache.sling.engine:2.7.10.B0004]
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138) [com.day.cq.wcm.cq-wcm-core:5.12.226]

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 3

Can you provide a screenshot of your CF with values filled, it seems at least through the code that element is null so it is throwing this exception.

 ContentElement element = fragment.getElement(name);
 if (element == null) {
     throw new ContentPostServlet.UpdateException("No element '" + name + "' defined", 400);
 }

View solution in original post

3 Replies

Avatar

Level 3

Hi @skumari !

Can you please tell us AEM version you are using and structure of your CF Model.

 

Regards,
Shailesh

Avatar

Level 3

AEM 6.5.16.0

Structure of content fragment model is:-/content/dam/content-fragment/caas/bookpedia

Avatar

Correct answer by
Level 3

Can you provide a screenshot of your CF with values filled, it seems at least through the code that element is null so it is throwing this exception.

 ContentElement element = fragment.getElement(name);
 if (element == null) {
     throw new ContentPostServlet.UpdateException("No element '" + name + "' defined", 400);
 }