[opencms-dev] Corrupted Offline Project after Database Import

Sick, Steffen ssick at team.mobile.de
Mon Apr 7 10:03:10 CEST 2014


Hi Michael and Stephan,

thanks for helping me understand the issue and for the suggestions to fix it! The colour of the folder in the workplace is indeed black. So changing the parent IDs in the database will probably do the trick. I also checked again the sub-folders, by the way, and they are also there multiple times each, several times with STRUCTURE_STATE = 2 and once with STRUCTURE_STATE = 0. They point to different PARENT_IDs. So I'd need to apply the fix also for these. I also will check the site selector for future Exports/Imports.

I just had another idea. As I can actually see the missing folders and files when switching the Project selector from "Offline" to "Online": would it make sense to carry out another Database Export, but this time from the Online Project, and re-import the zip file into the Offline Project on the same instance?

Also, does it make any sense to delete the folder which appears empty beforehand in the Offline Project?

I still wonder how my Online and Offline Projects were able to get out-of-sync. How are the resources in the Offline and Online Projects mapped to each other?

Thanks and kind regards
Steffen



2014-04-04 16:11 GMT+02:00 Stephan Hartmann <hartmann at metamesh.de<mailto:hartmann at metamesh.de>>:


>  Hi Steffen,

>

>  Structure state 2 means "new", state 0 means "unchanged".

>  What's the colour of the folder that you see in the workplace? I guess it's black meaning it is the one with state 0 (unchanged).

>  You could change the parent id of your files to the structure id of the folder with state 0 and delete the other three folder entries. Are you sure that the problem doesn't >  exist with sub-files/-folders as well?

>  In any case - make a database backup before you make any changes ;)

>

>  Beste regards,

>  Stephan

>

>

>

>  2014-04-04 13:29 GMT+02:00 Sick, Steffen <ssick at team.mobile.de<mailto:ssick at team.mobile.de>>:

>

>  >  Hi,

>  >

>  >

>  >

>  > I'm using OpenCms 7.5.4 on a productive and several test environments.

>  > I used the Database Management module to export a directory structure

>  > with files from my test environment, and then import the zip file into

>  > the productive environment.

>  >

>  >

>  >

>  > Now the problem is: the files were imported (and can be accessed from

>  > the website, i.e. they are available in the Online project), but I

>  > cannot see them in the OpenCms Explorer. The folder where the files

>  > are supposed to be is just empty. I tried touching the folder,

>  > re-building the search indexes, and several things more, but no success.

>  >

>  >

>  >

>  > So I started investigating the database. I found out that in table

> >  CMS_OFFLINE_STRUCTURE, there are actually 4 entries for that very

>  > folder; 3 of them have STRUCTURE_STATE = 2, one has STRUCTURE_STATE =

>  > 0. Moreover, the resources that are supposed to be inside that folder,

>  > but are invisible, all have a PARENT_ID that matches the STRUCTURE_ID

>  > of one of the

>  > 3 folder entries with STRUCTURE_STATE = 2. It seems that this could be

>  > the root cause.

>  >

>  >

>  >

>  > Can anyone enlighten me on the semantics, or has anyone an idea how to

>  > fix this? At the moment I think about using SQL on the database, but

>  > I'm unaware about the side effects.

>  >

>  >

>  >

>  > Thanks

>  >

>  > Steffen

>  >

>  >

>  >

>  > _______________________________________________

>  > This mail is sent to you from the opencms-dev mailing list To change

>  > your list options, or to unsubscribe from the list, please visit

>  > http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev

>  >

>  >

>  >

>  >

>  >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140407/5cff834c/attachment.htm>


More information about the opencms-dev mailing list