In ArcGIS Online, when sharing an editable layer publicly, the following error message is returned:
Error: Unable to share editable layer publicly To share publicly, first turn on the Public Data Collection option on the Settings tab of the layer’s item page then share again. For optimal performance and data integrity, please consider disabling editing or using a non-editable view layer.
This issue occurs when editing the hosted feature layer is enabled and public data collection is disabled.
Depending on the way the layer is shared, the workarounds below are applicable.
Share the layer publicly and prevent editing
Note: Alternatively, share the layer publicly by disabling both public data collection and editing. If both options are disabled, the Enable editing option can only be enabled by changing the Share setting back to Owner first. For more information, refer to ArcGIS Online: Allow or prevent editing on public layers.
Share the layer publicly and allow editing
Note: When sharing the layer after enabling public data collection, a warning message regarding optimal performance and data integrity is returned. Click Update to share the layer publicly.