Question

Issue InFolder table

Dear community

 

I've a problem on *InFolder table.

The Inherit column FolderId is setup with BaseFolder when I try to set with *Folder lookup the changes are not saved.

If I try to publish the changes, I receive this error;

An error "42P01: The relationship" public.BaseFolder "does not exist has occurred

 

Like 0

Like

10 comments

Hi Stefano,

 

I guess you've faced an out-of-the-box problem that was fixed in 7.17.3. The problem is that the section wizard created a section incorrectly in some cases till 7.17.3 - the ObjectInFolder column had the value of "BaseFolder" in the "FolderId" column in case the object represents a section created via a section wizard. The correct value should be "ObjectFolder". In other words if the object for the section is UsrExam then the value for the UsrExamInFolder FolderId column should be UsrExamFolder.

 

To fix the problem the metadata of the ObjectInFolder object should be modified. Please open the metadata, go to "Modifications package" and find the 37's row. Add this line there:

 

= MetaData.Schema.D2.["9e46bb69-9788-423c-b7cd-4c624081082d"].S4 "2d8dd6bd-d45e-4518-a52d-88edfbefb8c4"

 

and replace the  2d8dd6bd-d45e-4518-a52d-88edfbefb8c4 with an actual UId of the ObjectFolder (can be found either in the SysSchema table or in the object properties from configurations). Once done save the metadata, reopen the object and publish it. As a result correct value will be specified in the "FolderId" lookup.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

Does the original 37's row need to be overwritten with the new one ?

 

Stefano Bassoli,

 

No, just add empty space after the 36th row and on the 37th row paste the string with an updated GUID value that refers to ObjectFolder object.

 

Best regards,

Oscar

Oscar Dylan,

After saving the changes on Metadata data, the lookup binded to *InFolder.Folder column is correct. 

When I try to publish I receive the same error

Stefano Bassoli,

to skip the problem I runned manually the ALTER TABLE CONSTRAINT and I forced the system to ignore the changes SysSchema.ModfiedOn = SysSchema.StructuredOn

What do you think about ?

Stefano Bassoli,

Hi Oscar,

I've a similar problem with *InTag table, which row must be edited in metadata, go to "Modifications package"

 

Thank you in advance

Stefano Bassoli,

Hi,

I solved!

Hi Stefano,

 

Could You share update what You done in case to fix the proplem on top of Oscar advise ?

 

I have the same problem that after modify metadata on save system reverts any changes so Folder field is populated again as BaseFolder.

 

Best Regards,

Marcin

Hi Marcin,

  1.  I checked in the Postgres log file what happened in the database, an error occurred during the changes table when adding a constraint with the * search folder.
  2. I followed the Oscar's instructions
  3. I manually executed the alter table command which raises the error (obtained in 1) by writing the right constraint FK on the right table
  4.  I ran an update command on the "SysSchema" table for my entity to force the SysSchema.ModfiedOn field to equal SysSchema.StructuredOn so the system will not attempt to install

 

Hi Stefano,

 

Thank You for update. I went through Your instruction but still faced the same result. I'm sure that is correct but to not waste a time i decided to went through different approach:

Just i have deleted incorrect object, created new one with the same name based on BaseEntity, then added column Folder.

 

It's seems that it's work (i may sucessfully install package on local environment as well as on cloud). To be completely safe any time when i'm deleting object schema i have a copy on SVN as well and local metadata export.

Show all comments