creating express entries programmatically
Permalink
Anyone hear have success creating entries in a block.
using the code from the docs when including
i get the error
"The use statement with non-compound name 'Express' has no effect"
when using I get
"Entity of type Concrete\Core\Entity\Attribute\Value\ExpressValue is missing an assigned ID for field 'attribute_key'. The identifier generation strategy for this entity requires the ID field to be populated before EntityManager#persist() is called. If you want automatically generated identifiers instead you need to adjust the metadata mapping accordingly."
of course the second may be caused by the first and the first may be caused by being in a block instead of a package install controller. I'm a hair out of my comfort zone here.
I'm trying to write some one time code to import some records and add them as entries. The import works fine i just cant add entries yet.
using the code from the docs when including
use Express;
i get the error
"The use statement with non-compound name 'Express' has no effect"
when using
Express::buildEntry
"Entity of type Concrete\Core\Entity\Attribute\Value\ExpressValue is missing an assigned ID for field 'attribute_key'. The identifier generation strategy for this entity requires the ID field to be populated before EntityManager#persist() is called. If you want automatically generated identifiers instead you need to adjust the metadata mapping accordingly."
of course the second may be caused by the first and the first may be caused by being in a block instead of a package install controller. I'm a hair out of my comfort zone here.
I'm trying to write some one time code to import some records and add them as entries. The import works fine i just cant add entries yet.
If it helps others, I think my issue here was the upgrade from 8.0.3 to 8.1.
There was no way of fixing it, apart from (manually) destroying the instance of my Express object and recreating it under 8.1
It now works.
There was no way of fixing it, apart from (manually) destroying the instance of my Express object and recreating it under 8.1
It now works.
bummer, not my issue as i built on a clean copy of 8.1
Just found this issue myself. Any solutions?
I'm guessing it's a database thing. Oh, I'm on 8.2 by the way.
I'm guessing it's a database thing. Oh, I'm on 8.2 by the way.
My code was working in 8.0.3, but now after updating to 8.1 I get that error.