Customer Portal - Best Practices for Customization


#1

After the most recent need to update my customer portal, I found myself needing to overwrite all of my (granted over a year old) customization’s to the customer portal for the sole purpose of getting the CC updates working correctly again.

I could have gone through the github change log and changed only what was necessary but time is always of the essence. I did backup my customization’s but rather than trying to remember everything I have changed and where I changed it, I was wondering if anyone had some in-site or best practices for customizing and still allowing for upgrades. My git skills aren’t amazing but if that would work, I would definitely learn and brush up my skills in that area.

Any thoughts or best practice help would be greatly appreciated.


#2

Usually with this type of situation you want to keep your custom code in git and use the official repo as an upstream. You can then pull and merge upstream changes pretty easily. https://help.github.com/articles/syncing-a-fork/


#3

Thanks @Graham_McIntire, I guess I’ll brush up on my git skills.
I appreciate the link!


#4

It’s fairly simple if you host your changes on Github as well - just click here:

Bear in mind you will need a paid account if you want a private repository. If you use a free account, all your changes will be publicly visible, so don’t embed anything you don’t want anyone to see. Graham is right though, this is the correct way to do it.


#5

Thanks @simon ,
Also a quick FYI for anyone who has shared their customer portal to another user, or worse, publicly.
You can remove the “.env” from the root of the portal directory but after connecting with your api key, at some point it grabs and stores the portal users plain text user/password under:

portal/vendor/sonarsoftware/customer_portal_framework/src/.env

Be sure to remove that one too. :wink:

Credit to: @Jeremy_Hall for catching that!


#6

It doesn’t grab it - that’s part of the setup.


#7

Wow, I didn’t realize that… must have done it so long ago.

GTK @simon GTK