-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement default selection for directories_categorySimple #817
base: 5.0
Are you sure you want to change the base?
Conversation
don't access database in constuctor |
@nsams added a check to the constructor. The initial problem: if creating a component and than cancel the process (without saving a value for the allowBlank(false) category-select) results in an exception on rendering the component. It's also not possible to delete the defect component or edit anything else on the site. |
kann der default wert nicht in der komponente gemacht werden wenn nix gespeichert ist? |
eigentlich wäre besser, wenn einfach eine fehlermeldung gerendert wird. den eine zufällige liste an artikel ist whs nie was man will. |
Ja, oder einfach gar keine artikel? |
If component throws an exception it's not possible to delete this in backend anymore or edit any other component in same paragraphs component. If component shows random articles superuser might not realise configuration is wrong so better show noting
Its's possible to cancel component creation leaving directory_component_id empty resulting in $itemDir object null. By only adding config values on existing itemDir component renders "no entries found" which should be an indicator for superuser that something is wrong.
hatte den selben gedanken auch gerade. Ist so angepasst. (und an einer weiteren stelle behoben) |
foreach ($model->getRows($s) as $row) { | ||
$itemIds[] = $row->item_id; | ||
} | ||
$select->where(new Kwf_Model_Select_Expr_Boolean(false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besser: return null
as this needs a category_id to work.