No account yet?
Home
Add to Google
Home
experience.vignette.com.br
Fórum
Welcome, Guest
Please Login or Register.    Lost Password?
Not able to add new data source attribute in a CTD (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: Not able to add new data source attribute in a CTD
#76
hemant (Visitor)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Not able to add new data source attribute in a CTD 2 Years, 4 Months ago Karma: 0  
Hi,

I have one CTD which has some nested relations with other tables. Now this is an old CTD which has content instances already created.

Now I got a new requirement to include a new 'Data Source Attribute' of widget type 'Content Select CCE' which VCM is not allowing me to do with existing Content Instance. but if I try to add new 'Data Source Attribute' of widget type 'Text Field' it allows me to do so. Also it is not allowing me to change attribute widget from Text Area to "Content Select CCE".

I understand that it is restricted in the vignette to add new relations in the CTD if it already has instances, but is there any way of adding a new DATA SOURCE ATTRIBUTE from the same related table in the CTD with a Content Select CCE widget.

This is required to maintain references of the items with the CI.

Please let me know if anybody has any idea.

FYI : we have VCM 7.3.1.1 with Content cumulative EFix v3.3

Please find the attached exception logs.

Thanks
Hemant
File Attachment:
File Name: CTD_UPdate_Exception.txt
File Size: 6830
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
 
Report to moderator   Logged Logged  
  Reply Quote
#77
viglet (Visitor)
Junior Boarder
Posts: 25
graph
User Offline Click here to see the profile of this user
Re:Not able to add new data source attribute in a CTD 2 Years, 4 Months ago Karma: 1  
Hi Hemant,

You can add new attributes with standard widget as text widget, otherwise you cannot have the Content Instances associated with CTD. Other important point is that the new attributes cannot be required, because there are inconsistence issues.

There are 2 options:

1. Export all content instances from this CTD and delete them. This way, you can modify the CTD. When you finish the CTD Modification, re-import the content instances.


2. Alter the content instance association into data_base_ schema. Important: You need have a VPS Support to help on this procedure, because an incorrect action can damage your environment.

First, you need find the CTD _xml_ Name, run the 2 DMLs below, and the 2 queries must have the same number the rows returned. On query, change the “CTD_NAME” word to your Content Type Name, that you want change:
-- Check the rows before the change
SELECT *
FROM vgnasmo_meta_data
WHERE _object_typeid =
(SELECT keystring1
FROM vgnasmomap
WHERE recordid =
(SELECT contentmgmtid
FROM vgnasmo_meta_data
WHERE NAME = 'CTD_NAME'
AND _object_typeid =
'CONTENTTYPE0000000000000000000000000TYPE' ))


SELECT COUNT (*)
FROM vgnrecord
WHERE recordsource =
(SELECT recordsource
FROM vgnrecord
WHERE ID IN (
SELECT keystring1
FROM vgnasmomap
WHERE recordid =
(SELECT contentmgmtid
FROM vgnasmo_meta_data
WHERE NAME = 'CTD_NAME'
AND _object_typeid =
'CONTENTTYPE0000000000000000000000000TYPE' )))

Execute the 2 DMLs below; to content instances will be unassociated from CTD and the 2 queries must have the same number the rows returned. On query, change the “CTD_NAME” word to your Content Type Name, that you want change:

-- Content instances are unassociated from CTD

UPDATE vgnasmo_meta_data
SET _object_typeid = 'CHANGE_CTD'
WHERE _object_typeid =
(SELECT keystring1
FROM vgnasmomap
WHERE recordid =
(SELECT contentmgmtid
FROM vgnasmo_meta_data
WHERE NAME ='CTD_NAME'
AND _object_typeid =
'CONTENTTYPE0000000000000000000000000TYPE' ));

UPDATE vgnrecord
SET recordsource = 'CHANGE_CTD'
WHERE recordsource = (SELECT DISTINCT (recordsource)
FROM vgnrecord
WHERE ID IN (
SELECT contentmgmtid
FROM vgnasmo_meta_data
WHERE _object_typeid =
'CTD_NAME'));
Commit

Change your Content Type into VCM, modifying the attributes. Save and approve it.
Execute the 2 DMLs below; to content instances will be re-associated from CTD and the 2 queries must have the same number the rows returned. On query, change the “CTD_NAME” word to your Content Type Name, that you want change:


-- Re-associated the content instances from CTD

UPDATE vgnasmo_meta_data
SET _object_typeid =
(SELECT keystring1
FROM vgnasmomap
WHERE recordid =
(SELECT contentmgmtid
FROM vgnasmo_meta_data
WHERE NAME = 'CTD_NAME'
AND _object_typeid =
'CONTENTTYPE0000000000000000000000000TYPE' ))
WHERE _object_typeid = 'CHANGE_CTD'

UPDATE vgnrecord
SET recordsource = (SELECT ID
FROM vgncms_object_
WHERE NAME = 'CTD_NAME')
WHERE recordsource = 'CHANGE_CTD'
commit

Regards,
Viglet Team
Enter code here   
Please note, although no boardcode and smiley buttons are shown, they are still useable
 
Report to moderator   Logged Logged  
  Reply Quote
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop