Hello,
i´ve a class "Article" with a lot of fields.
i´ve already defined two custom views, which shows less fields.
One of these custom views is defined as "default view".
But i always get showed the "Master" View.
I´ve checked everything. Database has it as default view, all is deployed perfectly.
Or is it - now - a feature, so that if i am an "Admin" User it will ignore these default view setting?? (haven´t dived deeper in the core code, sorry for that). But maybe someone has a sufficient answser for me?
Question 2: What steps are necessary to set up permissions which allow someone to access particular data objects? ('Define data object workspace for user (or assigned role).; Give user (or assigned role) 'objects' permission.')
Hello, Im new to Pimcore. Does Pimcore store product information example Acer Notebook with its model number in its database. Im busy with an e-commerce website and looking for product information (Images, technical spec etc). Places like icecat does store these type of information and you can access it via URL and decode the json structure.
any feedback would be appreciated, looking for an opensource db that I can query . thanks
Hey Pimconauts! 👨🚀
Pimcore Inspire is just around the corner.🚀
Don't miss a chance to get some great insights.
If you have not registered? Get your ticket here and see you on November 18:
👉 https://bit.ly/3kplzKe
Hi all, I'm experiencing a problem with static routes in 10.2.
When I use xdebug and follow step by step, the code in https://github.com/pimcore/pimcore/blob/10.2/lib/Routing/Staticroute/Router.php#L325 – the callback function to order routes – seems to be never excecuted, which means that static routes are not ordered by priority which in turn results in 404 errors in my project. Is that a bug or a feature?
Hi there,
I was trying to override a DataObject class (as documented in https://pimcore.com/docs/pimcore/current/Development_Documentation/Extending_Pimcore/Overriding_Models.html)
My config.yaml looks like this:
`
pimcore:
models:
class_overrides:
'Pimcore\Model\DataObject\BlogEntry': 'App\Model\DataObject\BlogEntry'
`
and the App\Model\DataObject\BlogEntry class looks like this:
`
<?php
namespace App\Model\DataObject;
use Pimcore\Model\DataObject\BlogEntry\Listing as BlogEntryListing;
class BlogEntry extends \Pimcore\Model\DataObject\BlogEntry {
private function setShowOnHomepageParent(?bool $showOnHomepage)
{
parent::setShowOnHomepage($showOnHomepage);
}
/**
* Set showOnHomepage
* @param bool|null $showOnHomepage
* @return \App\Model\DataObject\BlogEntry
*/
// this method already exists and is meant to be overriden
public function setShowOnHomepage(?bool $showOnHomepage)
{
if ( $showOnHomepage == true ) {
// Get all blog entries that are not the current object
$temp_blog_entry_listing = new BlogEntryListing();
$temp_blog_entry_listing2->setCondition("id != ?", $this->getId());
$temp_blog_entry_listing->load();
// Set showOnHomepage to false on all those blog entries
foreach ( $temp_blog_entry_listing as $key => $blog_entry ) {
$blog_entry->setShowOnHomepageParent(false);
}
}
$this->setShowOnHomepageParent($showOnHomepage);
return $this;
}
}
`
Unfortunately when adding a new blogEntry object (in the admin panel via DataObjects) I get the following error message:
Attempted to load class "BlogEntry" from namespace "App\Model\DataObject". Did you forget a "use" statement for "Pimcore\Model\DataObject\BlogEntry"?
Server threw exception - could not perform action. Please reload the admin interface and try again.
What am I doing wrong?
Hello, all !
I am implementing my own login action and i need to implement user authentication programmatically. I checked a lot of information and tried couple of approaches, but any of them is not working. Could anyone help me with that ?
This is my code:
/**
* Login
*/
public function authAction(
Request $request,
AuthenticationManagerInterface $authenticationManager
) {
$username = $request->get('username');
$password = $request->get('password');
if (empty($username) && empty($password)) {
throw new NotFoundHttpException();
}
/** @var \Pimcore\Model\User $user */
$user = Authentication::authenticatePlaintext($username, $password);
if ($user) {
$authenticationManager->authenticate(new UsernamePasswordToken($user->getEmail(), null, 'demo_frontend', $user->getRoles()));
}
}
I have a user after "authenticatePlaintext", but when i call $authenticationManager->authenticate( i got redirecting to "login" action and user is authenticated as "anon.". How can i authenticate user as a user?
Thank you in advance