Extending Sitecore Instance Manager - Part 2

As part of this series, I wish to look at the SIM repo for code analysis and do enhancements without creating my own new code base. Although the SIM Latest Release is based on release/1.6 branch, I've branched off develop since it has the latest changes for Sitecore 10. I just started with a minor fix here. Its an update to one of the messages in the application. Since its all work in progress by the Sitecore team, I understand that the one highlighted here will be taken care when the product is released but then the main purpose of this exercise of mine is I believe there is no better way to improve coding skills than working on a live code base that too by the Sitecore team. 

Now, over to the situation on hand -

SIM uses wizards and user controls to display messages as part of install/uninstall process. Here is the set of windows displayed for different steps in the installation process:

1. Step 1:


2. Step 2:


3. Preparing for install progress message:


4. Next, is step 3:


5. The Sitecore 10 installation works like a charm when you click the install button (above):


Now, let's get to the issue, let's uninstall the created website:

6. Here is the list of websites displayed in the home pane and these are the websites that were successfully installed through the previous step:

7. Click on the main site and through the Edit ribbon should be able to see the delete option for site uninstallation:

8. The step 1 pops:

9. Click the next button to continue with the uninstallation. Then, this confirmation window pops:
10. Click on Delete button above and then this message appears:


11. Note that this is the issue I wanted to fix, the message should be related to uninstall instead of install. So, I analyzed the code and found the following code line and added a ternary if condition so that it works differently for install and uninstall:


12. After the above code change:

During installation:



During uninstallation:

Happy coding until next one!

Comments

Popular Posts