Things to remember when setting up a CEF front end! When setting up many locals for various clients, things can get a bit cluttered in our minds. So to differentiate the versions and to have a general resource to help you out during your ramp up, we're going to talk about some pointers on getting started with a CEF Front End. From gotchas to some of the main differences between the CEF versions!
Such a difference, we're going to break this document up based on a two general version groups. One being CEF 2020.1 and up, and the other being everything prior to 2020.1.
They're not in the web folder anymore! These will be located in the CEF/08.Clarity.Ecommerce.UI.Skins folder.
You will have to create symlinks for these, read below for instruction.
One key benefit of this is our source control, now only CEF pull requests!
To add UserSnap, you can add the generated script given to you by a PM (or made yourself) and add it to the DNN Default.aspx (Dev HowTos Setup Usersnap).
Solution Items - where to locate and where to place!
Special note: All of the rewrite config files need to be placed in the 08 UI folder as well as the skins folder (located in the 08.Clarity.Ecommerce.UI.Skins/Your-Client-Skin)
Ensure that you have all of the appSettings.config from either the QA site or STG (usually on DFO) to have all of the functionality of the sites already in place.
Separate Stores/Brands, ensure that you have the sites set up in IIS (bindings), as well as have them added in the CEF database in the Stores.SiteDomain table (column "Url"). These can also be added in the Admin. The config does have to be present in the appSettings.config to work <add key="Clarity.FeatureSet.Stores.Enabled" value="true" /><add key="Clarity.FeatureSet.Stores.SiteDomains.Enabled" value="true" />
In general when setting up a Dev/QA or Local environment, you can turn on "debug mode" for CEF by using the following appSettings.config . This will mostly not be used in a Staging environment. <add key="Clarity.Storefront.DebugMode" value="true" />
When setting up the site for the first time and everything is running, you can run the Selenium tests.
Ensure that you have the Selenium IDE Chrome Extension (Selenium IDE)
Select your project from the modal (in the browser)
Get the .side file from the Teams channel wiki, QA Engineer, or Project Manager
Either run individual tests or entire projects
Ensure that your target URL is correct in the modal.
If you notice the skins are located in the web9 folder on clone, delete them to create your own symlinks, as those were included on accident by our source control.
For CEF 2020.1 and later, create a Symbolic Link in Windows (sort of a virtual directory for the OS itself) for the Skin by running the following command in an command prompt running as administrator:
mklink /D "Link" "Target"
For Example:
cd "C:\Data\Projects\2019.3\_DEV\WEB9\Portals\_default\Skins\"
Using TortoiseGit, mark the new symlink directories as Ignore On Commit
Note that older versions of CEF don't do this, DNN just has the skin folder directly
It's possible you may need to clear the caches via admin.
Locate these cache clearing buttons by typing "/Admin/Clarity-Ecommerce-Admin" then login with the Clarity credentials in team wiki. Then navigate to Site Maintenance!
PORTAL ALIAS: IN your DNN DB, you need to make sure you have included your new site url and info into the dbo.PortalAlias table!
THEN! Make sure your DNN/CEF db has the user that is in your connectionStrings (Windows User) file set as the DBOwner (this also needs to be done for the CEF db) (Network Service)
Typos ☹️This can happen anywhere, beware.
Possible issues with your CEF and WEB9 connection strings
Credentials for db
Connection String to DB correct
Make sure to run gulp build:minify after the build.
HTTPS: If you need your site to run on port 443 and have HTTPS functionality, you can add the ClarityClient SSL cert to your site via IIS. This will NOT cover sub-domains that are more than one level deep (i.e. shop.local-client.clarityclient.com), but will work for sub-domains (local-client.clarityclient.com).
If you don't have the SSL, you can export the SSL from DFO's IIS, copy/paste it to your local machine, and import it via IIS (on your machine).
Product Data/Credentials/User Roles:
If you are setting up a fresh instance of CEF and don't have a database to restore from a QA/STG site, you will need to seed the database via the projects in the backend code.
This will be in the CEF > 10.Testing > DataModel > Seeding > SeedDatabase.cs file. You'll just need to comment out the [Fact (Skip = "comment out the Skip when you need to seed the database")] line. These are currently on lines 14, 21 and 28.
//TODO MVC Wrapper to not include CEF Admin for subsequent "dealer" or "store" sites.
Some older clients may not have a solutions Items folder. In this instance, please reach out in the team channel to get some assistance, as not many are like this!
This is needed to add the skin path in your project.
500 URL Rewrite errors: Not all rewrite files or solution files were added to WEB9 folder and skin folder.
503 error: Are your app pools running?
PORTAL ALIAS: In your DNN database, you need to make sure you have included your new site url and info into the dbo.PortalAlias table!
Make sure your DNN/CEF database has the user that is in your connectionStrings file set as the DBOwner (this also needs to be done for the CEF db) (Network Service)
Typos ☹️This can happen anywhere, beware.
Navigating to the WEB css folder to run gulp sass
You may have to run npm i to install everything needed to run this command
Run the uber bat as admin inside web9 folder
Possible issues with your CEF and WEB9 connection strings