Why do I get "Form saving aborted not found 404" when saving edited contents?

Add-on:Scaffolding
Question:Why do I get "Form saving aborted not found 404" when saving edited contents?
Answer:

From what we are able to discern, the fault lies in Tomcat and not Scaffolding.

By default, Tomcat can only send 2MB of data per POST request.

In some cases, the amount of data in the request for the page happens to be more than 2MB. That will cause the 404 error.

The suggested fix for this would be to increase the value of the maxPostSize in your Confluence's server.xml (inside CONFLUENCE_INSTALL/conf/server.xml) to a value higher than 2MB.

In our tests, we have set it to 5MB (5242880). Refer to the Apache Tomcat Reference Pages for more information.

The actual location to do this is the following area:

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8090" minProcessors="5"
                   maxProcessors="75"
                   enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000"
                   useURIValidationHack="false" URIEncoding="UTF-8" maxPostSize="5242880" />

Take note of the last line. That is where you place the maxPostSize parameter.

Once this is done, restart your Confluence instance. After that, try saving the page once more in Edit Contents and it should now be good to go.

The value of 5MB is just a sample size that we've tried to ensure that the page gets saved. Your mileage may vary in accordance to your page size.