Upgrade Problem 2
Permalink
Hi,
I found another problem.
With this code
I am getting
I have grepped the source of 8.3 and can't find "CollectionType". What is the proper way to do this in 8.3?
I found another problem.
With this code
$pageType = \CollectionType::getByHandle('home'); if(!is_object($pageType)) { $data['ctHandle'] = 'home'; $data['ctName'] = t('Home'); $newPage = \CollectionType::add($data, $pkg); }
I am getting
Class 'CollectionType' not found
I have grepped the source of 8.3 and can't find "CollectionType". What is the proper way to do this in 8.3?
Try 'CollectionType' instead of 'CollectilonType'
Sorry, now I feel a bit dumb.
I thought I copied and pasted.
Ok, there was only the first instance that was spelled like that. I changed the spelling and now I still get the error.
I thought I copied and pasted.
Ok, there was only the first instance that was spelled like that. I changed the spelling and now I still get the error.
Try replacing \CollectionType with \PageType
That seems a little better.
Now I am getting this:
I tried changing ctName to ptName, and to Name, and neither helped.
Now I am getting this:
An exception occurred while executing 'insert into PageTypes (ptName, ptHandle, ptDefaultPageTemplateID, ptAllowedPageTemplates, ptIsInternal, ptLaunchInComposer, ptDisplayOrder, ptIsFrequentlyAdded, siteTypeID, pkgID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [null, null, 0, "A", 0, 0, "1", 0, 1, 12]: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'ptName' cannot be null
I tried changing ctName to ptName, and to Name, and neither helped.
Hi,
I just changed it to name instead of Name. And that got around this.
I just changed it to name instead of Name. And that got around this.
Now I get
And I will probably also need
$att_set = AttributeSet::getByHandle('bootstrap');
$boolean_att = AttributeType::getByHandle('boolean');
$bootstrap_att_1=CollectionAttributeKey::getByHandle('bpli');
SelectAttributeTypeOption::add( $bootstrap_att_4, 'bootstrap');
Class 'AttributeKeyCategory' not found
$att_coll = \AttributeKeyCategory::getByHandle('collection');
And I will probably also need
$att_set = AttributeSet::getByHandle('bootstrap');
$boolean_att = AttributeType::getByHandle('boolean');
$bootstrap_att_1=CollectionAttributeKey::getByHandle('bpli');
SelectAttributeTypeOption::add( $bootstrap_att_4, 'bootstrap');
Did you see my follow up question?