Juan_Liga
Posts: 32
Joined: Thu Mar 15, 2012 6:29 am
Location: Mexico
Contact: Website

An error occurred: Report ID = 34 does not exist

Mon Mar 04, 2013 10:24 pm

Hello,

I´m trying to create a template application and then export it to another server. I can "Mark" the aplication as "Template", but I can't export it, cause I get the error: "An error occurred: Report ID = 34 does not exist".

What can cause this?
How can I solve or workaround this?

Since I got a lot of Vehicles, EventRules, Geofences and tags. And also this configuration is moving dinamically. I really have to do the export via file.

Regards,
JUAN_LIGA

User avatar
johan
GpsGate
Posts: 14987
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: An error occurred: Report ID = 34 does not exist

Tue Mar 05, 2013 10:53 am

Please make sure all plugins are up to date and then try again.

1. Login to SiteAdmin
2. Go to Plugins
3. Update any plugin listed as "red".
4. Make sure Patch.3840 is installed.

Let us know if you still have problems.

Regards,
Johan

GpsGate Support

Juan_Liga
Posts: 32
Joined: Thu Mar 15, 2012 6:29 am
Location: Mexico
Contact: Website

RE: An error occurred: Report ID = 34 does not exist

Wed Mar 06, 2013 10:55 pm

I searched in the repositories and in one of them the Patch.3840 plugin was not updated, so I put it up to date. But that didn't resolve the problem.

I started "removing" old report definitions that we didn't use anymore and when I tried to export the templete App again the error text changed to "An error ocurred: Report ID = 16 does not exist".

At first, I thought that maybe I could resolve the problem if I erase them all. But I can't erase all the reports, since some of my applications need them.

Any other aproach that you suggest?

Regards
JUAN_LIGA

User avatar
Mattias
GpsGate
Posts: 135
Joined: Wed Dec 16, 2009 3:59 pm
Location: Sweden

RE: An error occurred: Report ID = 34 does not exist

Thu Mar 07, 2013 11:42 am

Hi,

This is on a server that you are hosting yourself right?
Try running the following query in the database:
UPDATE template
SET deleted = 1
WHERE object_type = 'GpsGate.Reporting.v3.ReportWriter'
AND object_id NOT IN (SELECT report_id FROM reportv3_report);

Let me know if this resolves your issue.

Regards,
Mattias

Juan_Liga
Posts: 32
Joined: Thu Mar 15, 2012 6:29 am
Location: Mexico
Contact: Website

RE: An error occurred: Report ID = 34 does not exist

Thu Mar 07, 2013 8:35 pm

Thanks Mattias, Yes, I have a server hosted by my own. I ran the query you gave me and immediatly, I could get the XML files from the templete applications.

Now, when trying to import the XML files in another server I get error:
"An error occurred: Unable to resolve object 'ea36fc0b-51a5-e612-d012-a0a7a2deaf0e'. Not found." It doesn't matter what xml file I import, I get the same error. Also I didn't ran the query you gaved me in the new server for not knowing if is the right thing to do.

Should I open a new thread (since this is a different error).
Can you assist me in this problem too?

Thanks for the help so far.

Regards
JUAN_LIGA

User avatar
Mattias
GpsGate
Posts: 135
Joined: Wed Dec 16, 2009 3:59 pm
Location: Sweden

RE: An error occurred: Report ID = 34 does not exist

Thu Mar 07, 2013 9:16 pm

Ah, yes, moving an application/a template from one server to an other can be a bit tricky at the moment.
And unfortunately it's not easy to find which object 'ea36fc0b-51a5-e612-d012-a0a7a2deaf0e' is. You can try to search for it in the XML file, but sometimes it doesn't give enough information.

We will try to improve this in later versions of GGS.

Make sure that you have the same plugins, reports etc installed on the new server. These are not exported with the template.
Are you using POIs? Neither POIs or POI categories are exported either, only references to them. You will need to remove these references from the exported file, either by disabling them in the GUI before exporting (remember to click Save first, and then go back into the app manage page again and click Export). You can also remove them manually from the XML if you are familiar with editing XML files.

Regards,
Mattias

Juan_Liga
Posts: 32
Joined: Thu Mar 15, 2012 6:29 am
Location: Mexico
Contact: Website

RE: An error occurred: Report ID = 34 does not exist

Sat Mar 09, 2013 5:09 am

Well, tricky gets short :)

I unmarked the POIs, and Reports. but the messages kept coming. As I found later all the event rules based on POIs and every report, give error to the import application.

To workaround this, I went to every Franson.Directory.Security.RoleTagWriter object and searched for these underlying priviledges:
_ReadLocationCategory
_EditLocation
_EditLocationCategory
_CreateReport
_ViewReport
After that, Removed all the ObjIDRef children. Since, as you said POIs and Reports don't export.

I Searched for these objects: GpsGate.PointsOfInterest.EventExpression.PointOfInterestEventExpression (This object led me to the POI based Event Rules) and found under this object the field TemplateGuid, this field contains a string. Then, I searched in the xml file the object that contains the string I mentioned earlier and Voila! That's the POI based event rule!
Anyway, after that I still had to search for this values inside this object:
ExpressionRef
NotifierRef
PostConditions
PostConditionRef
PreConditions
search for each value on the xml file and delete container object.

The Reports were easier, I just had to found the objects type GpsGate.Reporting.v3.ReportWriter and delete them. Inside these objects there is a ReportDefinition value, I searched the container object with this string in it and removed the whole object.

As you can see that's a lot of work just for one app. It would be cool in the future if the server can ask you if you're going to import to another server and trim all these objects for you!
I mentioned all of these cause I still have to make a few import/exports in the near future.

It would be nice if by then the import widget were more Admin-friendly :)

Best Regards
JUAN_LIGA

Return to “GpsGate for Developers”