Error Message
In ArcGIS Online, creating a hosted feature layer view returns the following error message:
Error:
The view layer could not be created. Try again.
The feature layer view is created and listed on the ArcGIS Online Content page, but it is not displayed when opened in Map Viewer.
Cause
- The metadata of the hosted feature layer contains unsupported HTML tags. This usually occurs when a layer is published from ArcGIS Pro and its metadata contains description with unsupported HTML tags such as 'STYLE = margin', or, if the alignment of the description is set to anything other than 'left'.
- The feature layer view title contains special characters, exceeds 90 characters, or, is used for another item in the same folder.
Solution or Workaround
Depending on the cause, the following workarounds are applicable.
Edit or manually type the metadata
In ArcGIS Pro or ArcGIS Online, edit to remove the feature layer metadata completely, or manually type the metadata to avoid unnecessary HTML tags.
Edit the feature layer metadata in ArcGIS Pro
- In ArcGIS Pro, open the metadata view of the layer to edit the content. Refer to ArcGIS Pro: Edit content in the metadata view for more information.
- In the metadata view, delete the text in the Description (Abstract) box, or, cut and paste the text into a Notepad.
- Click Apply and Save to save the blank Description (Abstract) box.
- Optionally, manually type the metadata text into the Description (Abstract) box. Ensure the text alignment is set to Align Left.
- Click Apply and Save to save the changes.
- Overwrite the web feature layer and select the Use the item description from the map or layer option in the Overwrite Web Layer pane. Refer to ArcGIS Pro: Overwrite a web feature layer for more information.
Edit the feature layer metadata in ArcGIS Online
- Open the item details page of the hosted feature layer.
- Under Layers, click the sublayer containing the metadata to open the details page.
- Under the Description section, click Edit , and delete, or, cut and paste the text into a Notepad. Ensure no text or HTML tags are left in the description box.
- Click Save and refresh the page.
Note:
Click Edit under the Description section once more to check if there are any HTML tags, such as the margin or alignment tags, remaining in the description.
- Optionally, click the Metadata button, click the Resource tab > Details tab > Description tab, and delete the text in the Description (Abstract) box. Click Save and Close to apply the changes.
- Optionally, manually type the metadata text in the Description section on the details page, and click Save.
Warning:
Do not remove the HTML tags from the feature layer's JSON in the REST endpoint. This may cause the feature layer and the feature layer views that have been created to lose edit functionalities in Map Viewer.
Rename the feature layer view title
While creating the feature layer view, in the last (Create view) section, rename the view title to remove special characters, or, truncate the title to 90 characters and below. Ensure the title is unique and not used for other items in the same folder.
Note:
In some cases, a hosted feature layer created from a zipped file geodatabase and uploaded into the ArcGIS Online Content page is corrupted. As a result, a hosted feature layer view cannot be created for the layer. In this case, republish the feature layer from ArcGIS Pro. Refer to ArcGIS Pro: Share a web feature layer for more information.