Reverting to a Previously Published Version of an Experience Builder Project

931
3
09-09-2024 01:26 PM
JeffreyThompson2
MVP Frequent Contributor
3 3 931

This is another developer's only tip. Online and Enterprise people, there's nothing to see here.

So you were working on an update to your Experience Builder project in one tab and an email to your spouse about what you really think about your boss in the other, somewhere along the way you got a bit mixed up and you just published something to the internet that you really shouldn't have. Now, you have 30 seconds to get the old project back online before you need to find a new job. Luckly, there is a way to hack the HTML to revert back to an old Experience Builder project. 

(I just found this a few minutes ago. I make no guarantees that it will not have some terrible unforeseen consequences.)

In the folder on your deployment server, you will find four items. One of them is a folder called cdn. The file you want to open is the index.html. Use the Open With option to open it in a code editor. Using Open will try and fail to open the application.

JeffreyThompson2_0-1725912353200.png

If you're as sloppy as me, this cdn folder will contain a bunch of numbered folders each one representing a built and deployed version of your application.

JeffreyThompson2_1-1725912494163.png

In the index.html, you will change two numbers to switch between build folders.

On line 1, find this href in the <base />.

JeffreyThompson2_2-1725913025704.png

On line 80, find the buildNumber attribute.

JeffreyThompson2_3-1725913083008.png

Subtracting one is a good bet for going back one version. This trick could be useful for maintaining multiple versions of an application for other reasons as well, like getting data from backup sources or seasonal variants.

But change it fast, before the boss finds out he has great organizational skills.

3 Comments
Contributors
About the Author
A frequently confused rock-hound that writes ugly, but usually functional code.