<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vikas Chauhan on Medium]]></title>
        <description><![CDATA[Stories by Vikas Chauhan on Medium]]></description>
        <link>https://medium.com/@chauhan.vikas990?source=rss-19d338c1fd17------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*X8SJrqbyO-DJY3ac</url>
            <title>Stories by Vikas Chauhan on Medium</title>
            <link>https://medium.com/@chauhan.vikas990?source=rss-19d338c1fd17------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 23:16:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chauhan.vikas990/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Creating Versions with Manage Publication in AEM]]></title>
            <link>https://medium.com/@chauhan.vikas990/creating-versions-with-manage-publication-in-aem-7384715d463e?source=rss-19d338c1fd17------2</link>
            <guid isPermaLink="false">https://medium.com/p/7384715d463e</guid>
            <dc:creator><![CDATA[Vikas Chauhan]]></dc:creator>
            <pubDate>Fri, 12 Sep 2025 17:24:30 GMT</pubDate>
            <atom:updated>2025-09-12T17:24:30.175Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdkreN1yaNhW6Xl7xjTJ9A.png" /></figure><p>If you’ve been working with <strong>Adobe Experience Manager (AEM)</strong>, you’ve probably noticed something curious:<br> When you use the <strong>Manage Publication</strong> wizard to publish pages or assets, <strong>no version gets created</strong>.</p><p>At first glance, this feels inconsistent — after all, when you hit <strong>Quick Publish</strong> or <strong>Publish Page</strong> from the Sites console, AEM <em>does</em> create a version automatically. Versions are not automatically created when using the <strong>Manage Publication</strong> option in some versions of Adobe Experience Manager (AEM), such as AEM as a Cloud Service (AEMaaCS), as this behavior differs from the on-premise version of AEM.</p><p>So why is Manage Publication different? Let’s unpack this.</p><h3>📌 How Publishing Works in AEM</h3><p>In AEM, publishing is essentially a <strong>replication process</strong>:</p><ul><li>Your content moves from the <strong>author instance</strong> to the <strong>publish instance</strong>.</li><li>Depending on how you trigger it, AEM may or may not create a version of that content before replication.</li></ul><p>There are two main publishing paths authors use:</p><ol><li><strong>Quick Publish / Publish Page<br>- </strong>Creates a version <strong>automatically</strong>.<br>- Ensures there’s always a rollback point if needed.</li><li><strong>Manage Publication<br>- </strong>Uses a workflow-based approach.<br>- Designed for scheduling, approving, and bundling multiple pages/assets.<br>- Does <strong>not</strong> create a version by default.</li></ol><h3>Why Manage Publication Doesn’t Create Versions</h3><ol><li><strong>Workflow-Centric<br>- </strong>Manage Publication orchestrates approvals, schedules, and bundles.<br>- Its focus is on <strong>when and how</strong> content goes live, not snapshotting every change.</li><li><strong>Performance Considerations<br>- </strong>Large-scale publishing (e.g., site sections, DAM folders) would bloat the repository if each item created a version.</li><li><strong>Explicit Control<br>- </strong>In some AEM versions (like AEM as a Cloud Service), Manage Publication has a <strong>“Create Version on Activation”</strong> option.<br>- It’s disabled by default to give authors the choice.</li></ol><h3>✅ <strong>Solutions to Ensure Versions Are Created When Using Manage Publication</strong></h3><p>The fix for this issue really comes down to a single setting:</p><p>Set “<strong>enableVersion</strong>” to <strong>true</strong></p><p>But the question is: <em>where</em> should you set it?<br> There are two main approaches you can take, each with pros and cons.</p><h4>Approach 1: Overlay the Manage Publication JS</h4><p>In this method, you overlay Adobe’s <strong>Manage Publication JavaScript</strong> located at:</p><pre>/libs/cq/gui/components/common/admin/managepublication/clientlibs/managepublication/js/managepublication.js</pre><p>Inside this file, add &quot;enableVersion&quot;: true to all the relevant data attributes of the requests (as shown in the image below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ShrhQna2qcD4dl19yCE8MA.png" /></figure><p>⚠️ <strong>Don’t forget</strong>:<br> Make sure your overlay includes a .content.xml file for the cq:ClientLibraryFolder, for example:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;jcr:root xmlns:cq=&quot;http://www.day.com/jcr/cq/1.0&quot; xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;<br>    jcr:primaryType=&quot;cq:ClientLibraryFolder&quot;<br>    categories=&quot;[cq.common.managepublication]&quot;<br>    dependencies=&quot;[granite.jquery,granite.utils,cq.common.bulktools.collectionstatus,cq.common.bulktools.references,cq.common.bulktools.includechildren]&quot;<br>    jsProcessor=&quot;[default:gcc;languageIn=STABLE;compilationLevel=whitespace,min:gcc;languageIn=STABLE;compilationLevel=whitespace]&quot;/&gt;</pre><p>🚨 <strong>Drawback:</strong><br> Overlaying means you now own this file. If Adobe updates managepublication.js in future service packs or releases, your overlay won’t pick up those changes automatically—you’ll need to manually reapply any updates.</p><h4>Approach 2: Create a custom clientlibs folder and intercept the manage publication request and modify the parameter of the request.</h4><p>A cleaner alternative is to <strong>leave Adobe’s file untouched</strong> and instead intercept the Manage Publication requests.</p><p>This is done by creating a <strong>custom client library</strong> and using jQuery $.ajaxPrefilter() to inject the enableVersion parameter before the request is sent. <em>$.ajaxPrefilter()</em> <em>handles custom Ajax options or modifies existing options before each request is sent and before they are processed by </em><em>$.ajax().</em></p><p>Since all the requests in managepublication.js are triggered via $.ajax(), $.ajaxPrefilter will help us to add a new parameter, “enableVersion”.</p><p>Suggested structure:</p><pre>/apps<br>  └─ project<br>     └─ clientlibs<br>        └─ author-clientlibs<br>           └─ managepublication<br>              └─ v1<br>                 └─ managepublication<br>                    ├─ .content.xml<br>                    ├─ js.txt<br>                    └─ managepublication.js</pre><p>.content.xml</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;jcr:root xmlns:cq=&quot;http://www.day.com/jcr/cq/1.0&quot; xmlns:jcr=&quot;http://www.jcp.org/jcr/1.0&quot;<br>    jcr:primaryType=&quot;cq:ClientLibraryFolder&quot;<br>    categories=&quot;[cq.common.managepublication]&quot;<br>    dependencies=&quot;[granite.jquery]&quot;<br>    jsProcessor=&quot;[default:none, min:none]&quot;/&gt;</pre><p>js.txt</p><pre>managepublication.js</pre><p>managepublication.js</p><pre>(function ($, $document) {<br>  return $document.ready(() =&gt;<br>  window.jQuery.ajaxPrefilter((options) =&gt; {<br>  if (options.url.includes(&#39;/etc/workflow/instances&#39;) &amp;&amp; options.type === &#39;post&#39; &amp;&amp; typeof options.data === &#39;string&#39;) {<br>    const params = new URLSearchParams(options.data || &#39;&#39;);<br>    if (!params.has(&#39;enableVersion&#39;)) {<br>      params.append(&#39;enableVersion&#39;, true);<br>    }<br>    options.data = params.toString();<br>  }<br>}))}(window.jQuery, window.jQuery(document)));</pre><p>✅ <strong>Advantage:</strong></p><ul><li>Adobe’s original file remains untouched.</li><li>Any future product updates are preserved.</li><li>You only maintain your own lightweight custom clientlib.</li></ul><h3>🎯 Which Approach Should You Choose?</h3><ul><li><strong>Approach 1 (Overlay)</strong> → Quick fix, but fragile. Use only if you have full control over upgrades.</li><li><strong>Approach 2 (Custom ClientLib)</strong> → Future-proof and cleaner. Recommended for most projects.</li></ul><h3>⚠️ Things to Keep in Mind</h3><ul><li><strong>Storage Growth</strong>: Auto-versioning large DAM assets can fill up storage quickly.</li><li><strong>Rollback Needs</strong>: If rollback is critical (finance, healthcare, government), enforcing version creation is worth it.</li><li><strong>Cloud Service Trend</strong>: Adobe is pushing towards workflow-driven publishing, so understanding this distinction is key for future projects.</li></ul><h3>🎯 Conclusion</h3><p>If you’ve been puzzled about missing versions when using <strong>Manage Publication</strong>, don’t worry — it’s not a bug, it’s by design.</p><ul><li><strong>Quick Publish</strong> → version always created.</li><li><strong>Manage Publication</strong> → version <em>not created by default</em>, unless configured.</li></ul><p>👉 The solutions are straightforward:</p><ul><li>Use Quick Publish for simple cases.</li><li>Enable the <strong>Create Version</strong> option in Manage Publication.</li><li>Or, better yet, customize the workflow so versions are always created automatically.</li></ul><p>By aligning your publishing process with your team’s compliance and rollback requirements, you’ll get the best of both worlds: <strong>efficient publishing</strong> and <strong>safe versioning</strong>.</p><blockquote>✨ Did this clear up your confusion about Manage Publication? Follow me for more AEM deep-dives, best practices, and real-world solutions.</blockquote><p><a href="/service/mailto: chauhan.vikas990@gmail.com">📧 Email Vikas Chauhan</a> | <a href="https://www.linkedin.com/in/vikas-chauhan-074b9a32/">🔗 Connect on LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7384715d463e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>