diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec668fe086..ba79507c8e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
- [Date/time fields] Date/time fields now support the usage without timezone support.
- [Icons] Overhauled Icon library and icon dropdown selector in class definition editor.
- [System Settings] Removed "Default-Language in Admin-Interface" setting.
+- [Security] Add CSP configuration option `frame-ancestors` (default: `self`).
#### v1.4.0
- [DataObject] Password data type algorithms other than `password_hash` are deprecated since `pimcore/pimcore:^11.2` and will be removed in `pimcore/pimcore:^12`.
diff --git a/composer.json b/composer.json
index 9c05284ecb..e78e49beea 100644
--- a/composer.json
+++ b/composer.json
@@ -14,8 +14,8 @@
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"cbschuld/browser.php": "^1.9.6",
- "phpoffice/phpspreadsheet": "^1.24 || ^2.1",
- "pimcore/pimcore": "~11.3.0",
+ "phpoffice/phpspreadsheet": "^1.24 || ^2.2",
+ "pimcore/pimcore": "~11.3.1",
"symfony/webpack-encore-bundle": "^1.13.2"
},
"require-dev": {
@@ -40,9 +40,6 @@
"kernel/Kernel.php"
]
},
- "conflict": {
- "symfony/string": "<6.0"
- },
"extra": {
"branch-alias": {
"1.x-dev": "1.5.x-dev"
diff --git a/public/css/admin.css b/public/css/admin.css
index e4aa14403a..56d8b3ab07 100644
--- a/public/css/admin.css
+++ b/public/css/admin.css
@@ -2376,3 +2376,27 @@ ul.leaflet-draw-actions.leaflet-draw-actions-top.leaflet-draw-actions-bottom li:
.pimcore_cb_middle_two_lines .x-form-cb-default {
top: -9px
}
+
+.pimcore_reverse-object-relation-warning {
+ width: inherit;
+ padding: 0 5px 0 20px;
+
+ white-space: initial;
+ background:url("/bundles/pimcoreadmin/img/icon/error.png") no-repeat scroll 0 0 transparent;
+}
+
+.pimcore_reverse-object-relation-panel {
+ overflow: visible !important;
+}
+
+.pimcore_reverse-object-relation-panel > .x-panel-bodyWrap {
+ overflow: visible !important;
+}
+
+.pimcore_reverse-object-relation-bottom-bar {
+ overflow: visible !important;
+}
+
+.pimcore_reverse-object-relation-bottom-bar > div {
+ height: 4.5rem !important;
+}
diff --git a/public/js/pimcore/document/document.js b/public/js/pimcore/document/document.js
index cd09171c5a..26ef981748 100644
--- a/public/js/pimcore/document/document.js
+++ b/public/js/pimcore/document/document.js
@@ -250,13 +250,13 @@ pimcore.document.document = Class.create(pimcore.element.abstract, {
const menuItem = this.toolbarButtons.publish.menu.items.items.find(
element => element.text === t('save_draft')
)
- menuItem.setHidden(false)
+ menuItem?.setHidden(false)
}
if (this.isAllowed("settings")) {
const menuItem = this.toolbarButtons.publish.menu.items.items.find(
element => element.text === t('save_only_scheduled_tasks')
)
- menuItem.setHidden(false)
+ menuItem?.setHidden(false)
}
this.toolbarButtons.publish.show();
diff --git a/public/js/pimcore/element/helpers/gridCellEditor.js b/public/js/pimcore/element/helpers/gridCellEditor.js
index 65094d0a76..51ef1cfd40 100644
--- a/public/js/pimcore/element/helpers/gridCellEditor.js
+++ b/public/js/pimcore/element/helpers/gridCellEditor.js
@@ -36,41 +36,43 @@ Ext.define('pimcore.element.helpers.gridCellEditor', {
value = Ext.clone(value);
- var fieldInfo = Ext.clone(this.config.fieldInfo);
- var fieldType = this.config.elementType;
+ const fieldInfo = Ext.clone(this.config.fieldInfo);
+ const fieldType = this.config.elementType;
//make sure that no relation data is loaded async
fieldInfo.layout.optimizedAdminLoading = false;
- if(!fieldInfo || !fieldInfo.layout) {
+ if (!fieldInfo?.layout) {
return;
}
- if(fieldInfo.layout.noteditable) {
+ if (fieldInfo.layout.noteditable) {
pimcore.helpers.showNotification(t('warning'), t('this_element_cannot_be_edited'), 'warning');
return;
}
this.context = this.editingPlugin.context;
- // this.callParent(arguments);
- var tagType = fieldInfo.layout.fieldtype;
+ const tagType = fieldInfo.layout.fieldtype;
// translate title
if(typeof fieldInfo.layout.title != "undefined") {
fieldInfo.layout.title = t(fieldInfo.layout.title);
}
-
+ let tag;
if (fieldType == "assetmetadata") {
- var tag = new pimcore.asset.metadata.tags[tagType](value, fieldInfo.layout);
+ tag = new pimcore.asset.metadata.tags[tagType](value, fieldInfo.layout);
} else {
- var tag = new pimcore[fieldType].tags[tagType](value, fieldInfo.layout);
+ tag = new pimcore[fieldType].tags[tagType](value, fieldInfo.layout);
}
if(fieldType == 'object') {
- var object = Ext.clone(this.context.record);
+ const object = Ext.clone(this.context.record);
tag.setObject(object);
+ tag.updateContext({
+ objectId: object.id
+ });
}
tag.updateContext({
@@ -82,7 +84,7 @@ Ext.define('pimcore.element.helpers.gridCellEditor', {
tag.finishSetup();
}
- var formPanel = Ext.create('Ext.form.Panel', {
+ const formPanel = Ext.create('Ext.form.Panel', {
xtype: "form",
border: false,
items: [tag.getLayoutEdit()],
@@ -145,10 +147,10 @@ Ext.define('pimcore.element.helpers.gridCellEditor', {
},
completeEdit: function(remainVisible) {
- var me = this,
+ const me = this,
fieldInfo = me.config.fieldInfo,
- startValue = me.startValue,
- value;
+ startValue = me.startValue;
+ let value;
if (fieldInfo.layout.noteditable) {
return;
diff --git a/public/js/pimcore/element/helpers/gridColumnConfig.js b/public/js/pimcore/element/helpers/gridColumnConfig.js
index 42d3b4cf51..40fc56e195 100644
--- a/public/js/pimcore/element/helpers/gridColumnConfig.js
+++ b/public/js/pimcore/element/helpers/gridColumnConfig.js
@@ -456,7 +456,7 @@ pimcore.element.helpers.gridColumnConfig = {
title: title,
items: [formPanel],
bodyStyle: "background: #fff;",
- width: 700,
+ width: formPanel.items.items[0].width + 25,
maxHeight: 650
});
this.filterByRelationWindow.show();
@@ -694,6 +694,12 @@ pimcore.element.helpers.gridColumnConfig = {
Ext.Msg.alert(t("error"), t("error_jobs") + ":
" + jobErrors.join("
"));
}
+ // Due to some ExtJS bug, when using a lock, the selection is visually cleared after batch operation
+ // To avoid confusion and disalignment on what we see from what is actually selected, everything is unselected
+ if (this.grid.hasOwnProperty('enableLocking') && this.grid.enableLocking){
+ this.grid.getSelectionModel().deselectAll();
+ }
+
return;
}
diff --git a/public/js/pimcore/helpers.js b/public/js/pimcore/helpers.js
index 0391379402..c8b3008d45 100644
--- a/public/js/pimcore/helpers.js
+++ b/public/js/pimcore/helpers.js
@@ -3379,7 +3379,7 @@ pimcore.helpers.treeDragDropValidate = function (node, oldParent, newParent) {
pimcore.helpers.isComponentAsChildAllowed = function (parentNode, childNode) {
const parentType = parentNode.data.editor.type;
const childType = childNode.data.editor.type;
- const allowedChildren = pimcore.object.helpers.layout.getRawAllowedTypes();
+ const allowedChildren = pimcore.object.helpers.layout.getAllowedTypes();
if (allowedChildren[parentType] &&
allowedChildren[parentType].includes(childType) ||
diff --git a/public/js/pimcore/object/folder/search.js b/public/js/pimcore/object/folder/search.js
index b259abf9fa..da560b7212 100644
--- a/public/js/pimcore/object/folder/search.js
+++ b/public/js/pimcore/object/folder/search.js
@@ -458,7 +458,7 @@ pimcore.object.search = Class.create(pimcore.object.helpers.gridTabAbstract, {
}
menu.add(new Ext.menu.Item({
- hidden: data.data.locked,
+ hidden: data.data.locked || !data.data.permissions.delete,
text: t('delete'),
iconCls: "pimcore_icon_delete",
handler: function (data) {
diff --git a/public/js/pimcore/object/tags/dateRange.js b/public/js/pimcore/object/tags/dateRange.js
index 32951eeeab..8039096170 100644
--- a/public/js/pimcore/object/tags/dateRange.js
+++ b/public/js/pimcore/object/tags/dateRange.js
@@ -82,8 +82,8 @@ pimcore.object.tags.dateRange = Class.create(pimcore.object.tags.abstract, {
getLayoutShow: function () {
this.component = this.getLayoutEdit();
- this.component.items[0].setReadonly(true);
- this.component.items[2].setReadonly(true);
+ this.component.items.items[0].setReadOnly(true);
+ this.component.items.items[2].setReadOnly(true);
return this.component;
},
@@ -98,15 +98,16 @@ pimcore.object.tags.dateRange = Class.create(pimcore.object.tags.abstract, {
renderer: function (key, value, metaData, record) {
this.applyPermissionStyle(key, value, metaData, record);
- if (record.data.inheritedFields && record.data.inheritedFields[key] && record.data.inheritedFields[key].inherited === true) {
+ if (record.data.inheritedFields?.[key]?.inherited) {
metaData.tdCls += ' grid_value_inherited';
}
if (value) {
const minDate = new Date(intval(value['start_date'] || 0) * 1000);
const maxDate = new Date(intval(value['end_date'] || 0) * 1000);
+ const shortDateFormat = pimcore.globalmanager.get('localeDateTime').getShortDateFormat();
- return `${Ext.Date.format(minDate, pimcore.globalmanager.get('localeDateTime').getShortDateFormat()), Ext.Date.format(maxDate, pimcore.globalmanager.get('localeDateTime').getShortDateFormat())}`;
+ return `${Ext.Date.format(minDate, shortDateFormat)}, ${Ext.Date.format(maxDate, shortDateFormat)}`;
}
return '';
diff --git a/public/js/pimcore/object/tags/quantityValue.js b/public/js/pimcore/object/tags/quantityValue.js
index 54b5d8c3b4..13c2596609 100644
--- a/public/js/pimcore/object/tags/quantityValue.js
+++ b/public/js/pimcore/object/tags/quantityValue.js
@@ -82,6 +82,11 @@ pimcore.object.tags.quantityValue = Class.create(pimcore.object.tags.abstract, {
});
var updateCompatibleUnitsToolTipContent = function() {
+ if(pimcore.globalmanager.get("user").isAllowed('quantityValueUnits') !== true) {
+ compatibleUnitsButton.hide();
+ return false;
+ }
+
if (this.inputField.value === '' || this.inputField.value === null || !this.unitField.value) {
compatibleUnitsButton.hide();
return false;
diff --git a/public/js/pimcore/object/tags/reverseObjectRelation.js b/public/js/pimcore/object/tags/reverseObjectRelation.js
index af757a0eeb..82c66cd6d3 100644
--- a/public/js/pimcore/object/tags/reverseObjectRelation.js
+++ b/public/js/pimcore/object/tags/reverseObjectRelation.js
@@ -112,10 +112,11 @@ pimcore.object.tags.reverseObjectRelation = Class.create(pimcore.object.tags.man
let columns = this.getVisibleColumns();
- this.component = new Ext.grid.GridPanel({
+ this.component = new Ext.grid.GridPanel({
store: this.store,
border: true,
style: "margin-bottom: 10px",
+ cls: "pimcore_reverse-object-relation-panel",
selModel: Ext.create('Ext.selection.RowModel', {}),
columns: {
defaults: {
@@ -160,17 +161,30 @@ pimcore.object.tags.reverseObjectRelation = Class.create(pimcore.object.tags.man
tbar: {
items: this.getEditToolbarItems(),
ctCls: "pimcore_force_auto_width",
- cls: "pimcore_force_auto_width"
+ cls: "pimcore_force_auto_width",
},
bbar: {
- items: [{
- xtype: "tbtext",
- text: ' ' + t('nonownerobject_warning') + " | " + t('owner_class')
- + ':' + t(className) + " " + t('owner_field') + ': '
- + t(this.fieldConfig.ownerFieldName) + ''
- }],
+ items: [
+ {
+ xtype: "tbtext",
+ text:
+ '