I am running into an issue with a service in a wep app on ArcGIS Online. I'm not sure if it's an AGOL issue or an ArcGIS Server issue, so I'm just posting it here.
I have a service with three layers in it; a point layer and 2 line layers. I got a call from a user this morning saying that while the two line layers were editing fine, the point layer would not save any changes made to it.
When checking the server logs I found that there was a severe level log message saying "Error: Objects in this class cannot be updated outside an edit session [LayerName]."
What I find weird though, is that if I try to edit the point feature class in the underlying web map, it will save the edits just fine. I also tried creating a completely new web map and then created a new web app off of that new web map and the point layer will still not edit.
I don't know why it will edit fine in the web map but not the app. They are both shared the same (with the organization and the group), I have double checked the Edit widget settings in the app to make sure that the layer is actually editable.
I first tried to restart the service and when that didn't work, I republished the layers overwriting the original service. And I still had the same issues.
Any advice to fix this issue would be appreciated.
If it matters, the service is on a stand alone 10.7.1 ArcGIS Server.
Solved! Go to Solution.
I figured out the issue.
While testing I discovered that edits weren't saving in the web map like I thought they were. When the map was refreshed, the edits that were made were gone. With that in mind, I thought it might have to do with the service.
So I first tried to publish a completely new service with the data from the database and I was having the same issues. But I ran into the same issues. I added the new service to a new map and when trying to edit, as soon as the map was refreshed, the edits were gone. So it wasn't an issue with the original service.
Since it wasn't a service issue (that I could tell) I wanted to see if I could edit the data in Desktop. So I opened Pro and pulled in the data. The first edit I made I got an error. But at least this time I got a message as to why.
The dataset wasn't registered as versioned. I registered the dataset as versioned and then went back to the original web app to test. Sure enough, edits were saving like they should.
What I get from this, is that ESRI needs the same kind of messaging when edits fail to save in web apps as they do in the desktop products. I wouldn't have had near as many problems if ESRI would have just told me *why* the edits weren't saving.
I would check the browser dev tools to see the calls that are being made when submitting the edit. It may have more details there.
You can compare them between the working web map and the failing web app.
First thing I check with that type of stuff is missing values for required fields and that required fields are visible in the service.
I figured out the issue.
While testing I discovered that edits weren't saving in the web map like I thought they were. When the map was refreshed, the edits that were made were gone. With that in mind, I thought it might have to do with the service.
So I first tried to publish a completely new service with the data from the database and I was having the same issues. But I ran into the same issues. I added the new service to a new map and when trying to edit, as soon as the map was refreshed, the edits were gone. So it wasn't an issue with the original service.
Since it wasn't a service issue (that I could tell) I wanted to see if I could edit the data in Desktop. So I opened Pro and pulled in the data. The first edit I made I got an error. But at least this time I got a message as to why.
The dataset wasn't registered as versioned. I registered the dataset as versioned and then went back to the original web app to test. Sure enough, edits were saving like they should.
What I get from this, is that ESRI needs the same kind of messaging when edits fail to save in web apps as they do in the desktop products. I wouldn't have had near as many problems if ESRI would have just told me *why* the edits weren't saving.