In this post I will be talking about exception “IsProduction field not accessible or does not exist”. In our case we had saved an existing site as site template in solution gallery and created a new site collection from saved site template but it was breaking with the below exception message.
“The field specified with the name IsProduction is not accessible or does not exist”.
The idea of using Site templates feature in SharePoint OnPrem helps with saving site as template and reusing the site template to pre provision the standard site elements in new site collection such as list, libraries, views, workflows, logos, branding and other elements for different department. Site templates are blue print for the site which can be used when we create new site collections.
Here the requirement was to save the existing site collection as site template with all the custom list, libraries, pages, content type and Nintex workflow. When the site collection was saved as site template it gets saved in the solution gallery and then can be available under the custom template section in the new site collection wizard.
Issue was when a new site was created using the saved custom template the provisioning terminated with the error “The field specified with the name IsProduction is not accessible or does not exist”. Since the error was not much descriptive and checking the SharePoint logs did not provide much information either.
To understand the root cause for the error, I checked field reference in site columns and content type but could not find any reference. Next step was to check the site template cab file (can be downloaded from the solution gallery) and looked for the reference in the site artifacts scheme definition files which pointed me to the Nintex list definition.
Nintex maintains a list internally to manage the site workflow definition, this list had a reference to the column “IsProduction”
On checking Nintex documentation and forums “The ‘IsProduction’ Field was introduced in 18.104.22.168 for subscription based Nintex. It was later removed due to few critical bugs”
To resolve the issue the reference for the column “IsProduction” had to be removed from the site template, then rebuild the package and deploy it to SharePoint.
I have put together the steps briefly to remove the field reference and deploy the wsp to SharePoint
Download the solution package for site template from the solution gallery in SharePoint site
Change the extension for wsp package to cab. To unzip the cap file we can use tool or command prompt. I had used the command prompt
Expand -R “Filename.cab” “Destination Folder” -F:*
Once the cab has been unzipped, go to the files folder.
Under Files è List folder => NintexWorkflows è Schema.xml
In the schema definition file remove the reference to the IsProduction field and save the file.
- Last step is to rebuild the wsp using the SharePoint stsadmin command prompt. After the wsp is built it has to be uploaded to the solution gallery and activated again.
With the new custom template, I was able to create the site collection without any issues. I hope this will help solve the issue. Happy Coding!!