Theme Developer Tool Overrides May Cause Error On Activation

Overrides implemented using the 2018.2 theme developer tools may cause an error on activation.

For example, if you copy a template (.tpl) or Sass (.scss) file from the Modules directory of the published extension to a theme Overrides directory, customize the new file, and then deploy and activate that theme, you may receive this error: Templates Job Error: Could not find overriding file. For more information about overriding an active theme using the theme developer tools, refer to Override Active Extension Files.

This issue occurs because the theme developer tools are not adding overrides to your theme’s manifest.json file as part of the deployment process as expected. This issue has been fixed in the 2019.1.2 release of SuiteCommerce Advanced. If you experience this issue and cannot migrate to the latest release, you can fix this issue as described in the following procedure.

Step 1: Edit the overrides.js File

  1. Locate the gulp/extension-mechanism/overrides.js file in the top-level directory of your theme developer tools installation.

  2. Add the following lines of code to the overrides.js file:

                    file_path = file_path.replace(extension_manifest.vendor + '/', ''); 
    file_path = file_path.replace(extension_manifest.name + '/', ''); 
    
                  

    The following example shows where to place the new lines:

                    else if(ext === '.tpl')
    {
        var aux = dst_path.split('/')
        ,   extensions_name = aux.length > 1 && aux[1]
        ,   file_path = aux.join('/')
        ,   extension_manifest = manifest_manager.getManifestByName(extensions_name);
    
        file_path = file_path.replace(extension_manifest.vendor + '/', '');
        file_path = file_path.replace(extension_manifest.name + '/', '');
       
        _.each(extension_manifest.templates.application, function(app, app_name)
        {
           var files = theme_manifest.templates.application[app_name].files;
          
           if(_.contains(app.files, file_path) && !_.contains(files, src_path))
          {
              files.push(src_path);
          }
       });
       
    } 
    
                  

Step 2: Deploy and Activate Your Theme

  1. Deploy the theme to your NetSuite account. Refer to Deploy a Theme to NetSuite for details.

  2. Activate the theme as described in Activating Themes and Extensions.

    After following the preceding steps, the theme development tools will automatically add overrides to your theme’s manifest.json file so that activations are successful.

Related Topics

SCA Patches

General Notices