• Tips

    Delete the undelete-able folder – Windows 7, 8, 10

    If you are using Windows 7, 8, or 10, sometime there are some folders appear to be super stubborn, and refuse to go away. No matter how much you try, it just can’t be deleted. It’s undelete-able. Any attempts would result in this dreadful dialog box: “Are you f*cking kidding me? This is my computer and I have the the absolute control over everything” – You said. Naturally, you would go to open the Security tab in Properties dialog to grant the permissions to everyone. Strangely, the tab is empty! In other words, there is no one granted permission to nothing. What? Why? How? The truth is quite shocking: the…

  • Tips

    Debuging React tests with Visual Studio Code

    Visual Studio Code is awesome and it is getting more and more popular in front end development. It’s great to write code, but you know what, it can be an IDE and allow you to debug your tests as well: Go to Debug/Add Configuration menu and add this setting: [crayon-5c116d44da44b082799657/] You can see that we are invoke the react-scripts-ts command with test argument. This also means we are not limited to tests – but I’m yet to debug the normal code. Now it’s important to remember: you have to open your root folder, in most of the cases, the parent folder of src, in Visual Studio Code. This is to…

  • Catalog,  Commerce,  Episerver,  Tips

    Multiple catalogs with same url

    This is an excerpt from my second book . The first chapter is available to read for free. A business is having an Episerver Commerce instance with multiple sites and multiple catalogs set up. They want to make sure each site will use one catalog, and all of them will share the same url for catalog structure. So it’ll be “https://site-a.com/products/category/”, and “https://site-b.com/products/category/”. Site A and site B are using different catalogs. Is this doable? Yes! It’s just a matter of magic with the routing. This time, we would need to do an implementation of HierarchicalCatalogPartialRouter ourselves. First, let’s create a template for it: [crayon-5c116d44db0dc036324077/]

  • IIS,  Tips

    Fixing HTTP Error 500.19 – Internal Server Error

    When you are trying to setup an IIS website on your local machine/new server, it’s very likely that you are going to get this error HTTP Error 500.19 – Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information: Module    IIS Web Core Notification    Unknown Handler    Not yet determined Error Code    0x8007000d Config Error Config File    \\?\C:\EL\EL\CMS\web.config Requested URL    http://el:80/ Physical Path Logon Method    Not yet determined Logon User    Not yet determined Config Source: [crayon-5c116d44db58d464752475/] More Information: This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some…

  • Catalog,  Commerce,  Episerver,  Performance,  Tips

    Speed up your Catalog incremental indexing

    As your products are being constantly updated, you would naturally want them to be properly (and timely) indexed – as that’s crucial to have the search results that would influence your customers into buying stuffs. For example, if you just drop the prices of your products , you would want those products to appear in new price segment as soon as possible. This should be very easy with Find.Commerce – so if you are using Find (which you should) – stop reading, nothing for you here. Things, however, can be more complicated if you are using the more “traditional” SearchProvider.

  • TeamCity,  Tips

    Fixing Cannot find module ‘sync-exec’ error with yarn install

    Error message: clientResources\node_modules\uglifyjs-webpack-plugin: Command failed. Cannot find module ‘sync-exec’ Reason: uglifyjs-webpack-plugin 0.4.6 defines this command  “postinstall”: “node lib/post_install.js” which looks like this [crayon-5c116d44dbc6a585963012/] So if your node instance is older than 0.10, it will fallback to require sync-exec . Unlike execSync which is a builtin module, sync-exec is, or was an old module that you have to install explicitly. If your node instance does not have that installed, boom!

  • Commerce,  Episerver,  Random thoughts,  ranting,  Tips

    Why you should upgrade to the latest version

    I made no secret that I’m a die-hard advocate for upgrading to latest EPiServer CMS/Commerce version. There are several reasons for that, mostly from new shiny features that your businesses dearly need, new big performance improvements that your customers firmly demand. But there is another, not so obvious reason: support. Let me tell you a story. This morning we received a support case from support team. A customer recently upgraded from Commerce 7.5 (Eww) to 11.7 (Yay!), things went well except they had a small problem with data displaying in Catalog UI. Some of the properties were not properly displayed, but they are still showing correct in Commerce Manager.

  • Commerce,  Episerver,  ServiceAPI,  Tips

    ServiceAPI + Postman, a match in heaven

    No, it’s just a note-to-self. A lot of customers have been using ServiceAPI, and to great successes. We also have very good documentation here – of which largely thanks to my colleague Mark Hall. But what if you want to play around with ServiceAPI and don’t want to write app/build/run it yourself? The answer is simple: There are many REST Clients can do the job for you, and Postman is usually regarded as the best/most popular one. But, the documentation are for C# client, it can be quite confusing to use Postman to work with ServiceAPI for the first time (or times). If you are experienced with Postman, great! But…

  • Learning,  Life,  Random thoughts,  ranting,  Tips,  Uncategorized

    Choose your battles

    This is the third part of the series: How to survive and thrive – a series for new developers to become better at their jobs. You can read the first two parts here and here. In military, there is a term of “uphill battle”. That when you have to fight your way up a hill, when you enemy controls the top. It’s a very difficult fight and your chance of success is low. Any experienced military leader knows uphill battles are something you should avoid until there are no other options. That also applies with any jobs. Including programming. The truth is, you shouldn’t fight the battles you can’t win.

  • Catalog,  Commerce,  Episerver,  Performance,  Tips,  Uncategorized

    Mass update catalog entries

    This is something you don’t do daily, but you will probably need one day, so it might come in handy. Recently we got a question on how to update the code of all entries in the catalog. This is interesting, because even thought you don’t update the codes that often (if at all, as the code is the identity to identify the entries with external system, such as ERPs or PIMs), it raises a question on how to do mass update on catalog entries. Update the code directly via database query. It is supposedly the fastest to do such thing. If you have been following my posts closely, you must…