Expand my Community achievements bar.

getting 412 error for blog entries when I delete a blog.

Avatar

Level 3

When I tried to deleting a blog entry on Author from side kick this is the command --> POST /bin/wcmcommand HTTP/1.1 that runs . I am getting 412 on browser console.

these are from request.log

26/Apr/2016:02:54:55 -0400 [52057] -> POST /bin/wcmcommand HTTP/1.1
26/Apr/2016:02:54:55 -0400 [52057] <- 412 text/html 84ms
26/Apr/2016:02:55:10 -0400 [52058] -> POST /bin/wcmcommand HTTP/1.1
26/Apr/2016:02:55:10 -0400 [52058] <- 412 text/html 184ms

This issue occurs only when I access author through dispatcher ( there is a v-host configuration in dispatcher and  I can login to author from dispatcher defined domain-name ).

I am not facing this issue I  access author directly  ( not through dispatcher).

Any Ideas on how to resolve this 412 error for POST /bin/wcmcommand for deleting blog entry

6 Replies

Avatar

Level 10

Are you getting more information in the log files? Can you please post if there are more messages. 

Avatar

Level 3

I am not  getting any errors in log files.

I am getting java script error on the browser console 

granite.js:235 POST https://auth-dev.fireeye.com/bin/wcmcommand 412 (Precondition Failed)

XMLHttpRequest.send @ granite.js:235

send @ jquery.js:9659

jQuery.extend.ajax @ jquery.js:9210

post @ shared.js:241

CQ.wcm.Sidekick.CQ.Ext.extend.internalDelete @ widgets.js:161990

(anonymous function) @ widgets.js:161936

(anonymous function) @ widgets.js:2282

Avatar

Level 3

When I logged onto author box using IP-adress and port number -> http://<ipaddress>:4502/libs/granite/core/content/login.html

Then I open the blog-entry page and I clicked the delete blog entry on side-kick.

 I get a dialog with heading Delete page? and it has below contents

 

This page is referenced. Click 'yes' to proceed deleting the page, click 'no' to review the references or 'cancel' to cancel the operation.

When I click ok blog-entry gets deleted. 

But I do see all the javascript errors when even when I have logged in from IPadress.

But when I access  the blog entry from dispatcher URL ( not IP based login) and delete the blog entry , I don't get the dialog that I have explained above, instead I get a pop-up that says unspecified error and I do see those java script errors on the console.

Avatar

Level 10

Looks like an issue - please open a ticket

Avatar

Level 2

I had the same issue.

I solved the problem by change the DispatcherPassError directive on my dispatcher config file.

Refer to this page for more information: https://docs.adobe.com/docs/en/dispatcher/disp-install.html

Avatar

Level 3

Thanks for the pointers.

We have setup DispatcherPassError 1 in our dispatcher configs, since we need dispatcher to handle error pages  and error page is unique for each of the site we host on AEM.

So as you mentioned when have the above setting there is a 412 error that is sent by author when we delete a blog entry on AEM 6.1 and when that error is reported by author , dispatcher will handle the request and not author. Hence this was causing the delete functionality to break.

So as per adobe documentation-->https://docs.adobe.com/docs/en/dispatcher/disp-install.html , I have modified the above setting to allow 412 error code to be handled by author by using the below setting .

DispatcherPassError 400-411,413-417

Now we are able to delete the blog entries.

But the original error as to why we get 412 error is still a mystery.