Hello my apologies for the wall of text, I was wondering if somebody could shed some light on the following:
I am building a product Class, i want to:
After some research I was not able to find a import method for Class related attributes except for constructing a custom bulk import via Data Objects with a custom json file This seems to work with importing Object Bricks, but this feels like the wrong approach and not scalable( one error and its back to manual editing of the class).
I also found some methods regarding creating FieldCollections via the PHP Api, however this seems to rely on the fact that a fieldCollectionClass should already exist, is this assumption correct?
At this point I am not sure whether to use Object Bricks, fieldCollections or something custom?.
What is the best way forward for this specific case?
Thanks in advance,
Sorry!
window.top.pimcore.helpers.openObject(129, 'object');
Hi, I already asked this question some time ago but I still found no answer.
How can CoreCacheHandler::$handleCli
be set to true
in Pimcore 10? I can inject CoreCacheHandler
in Pimcore 6, but this class is now @internal
. Pimcore docs say I should use \Pimcore\Cache
directly but there's no method for setting $handleCli
. setForceImmediateWrite
is there, but no setHandleCli
.
I found no place in Pimcores code using that setting. Caching seems to work for me without setting $handleCli
to true. Is that feature not used anly more?
$imageGallery = $product->getImageGallery() ?? [];
$imageGallery[] = new Hotspotimage($asset);
$product->setImageGallery($imageGallery);
$product->save();
Hi all, in Pimcore 10 I'm overriding models as described in https://pimcore.com/docs/pimcore/current/Development_Documentation/Extending_Pimcore/Overriding_Models.html
I have a model with a method that needs to build a uri from a static route. How can I inject Pimcore\Routing\Staticroute\Router
into a model so that
$object = MyModel::create();
$object->getTheGeneratedUrl();
works? In Pimcore 6 the method looked like
class MyModel extends Pimcore\Model\DataObject\MyModel {
// […]
public function getTheGeneratedUrl(): string
{
$route = Staticroute::getByName('MyRouteName');
return $route->assemble(['param' => $this->getParam()], true)
}
}
Now it seems like I need to use Pimcore\Routing\Staticroute\Router
, but how can that service be accessed within a custom model? Simply using Bootstrap::kernel()->getContainer()->get(Router::class);
won't work.
Hey all, I have a question regarding the the way Pimcore stores Classification Stores in combination with versioning in git.
I have a Class named "Product", and a classification store named "Specs"with id 14 set up locally. When I install Pimcore on a server i can use the Product class with no problems. However, the Classification Store is not 'committed' to git's versioning. On Staging the product class still has a reference to the classification store with id 14, but this classification store does not exist.
What I've tried: I created a new classification store on staging with the same set of fields and setup the Product Class to use the new Classification Store. This works, however on the first new deployment git correctly states that my Product Class is overwritten and my deployment is stopped. After each deployment via Git the classification store in the Product class should be set again to the correct Classification Store.
What is the general best practice with regards to the classification stores? Is it possible to commit the classification stores that I have setup locally in my Git Repo or should I use a different method?
Thanks in advance
Hello dear community!
I have added a setting to an existing areabrick (image gallery). In the backend, a grid size can now be selected via 'Pimcore Select'.
The brick is already included in some pages and snippets. But so far the new setting only takes effect when I open a single page in the backend and then save it. But now I don't want to open and save each page individually for the setting to be active. Does anyone have an idea how I could do this for the entire site? Or would this have to work 'out of the box'? I have tried setting a default value.
{% if grid_select.isEmpty() %}
{% do grid_select.setDataFromResource("3") %}
{% endif %}
I am in the process of migrating from pimcore 6 to pimcore 10.
Have the following requirement in my composer.json:
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"pimcore/pimcore": "^10.0",
}
However composer is installing 10.x-dev
(which seems a develop branch to me) instead of latest stable 10.0.7
.
How can I make sure only the latest stable is installed.
In packagist also these versions are shown (10.x-dev
and 10.0x-dev
). https://packagist.org/packages/pimcore/pimcore
Hi,
has anybody encountered this error ever before?
request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Scripts not found" at /var/app/current/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php line 294 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): Scripts not found at /var/app/current/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:294)"} []
Due to this, none of the pimcoreadmin bundle Javascripts are loading and "pimcore_admin_misc_scriptproxy" route is throwing 404