Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/11.0' into 11.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
#	models/DataObject/Classificationstore.php
#	models/DataObject/Data/Link.php
#	models/WebsiteSetting.php
  • Loading branch information
dvesh3 committed Aug 3, 2023
2 parents 0cee680 + e537571 commit ddb07b2
Show file tree
Hide file tree
Showing 32 changed files with 261 additions and 221 deletions.
14 changes: 1 addition & 13 deletions bundles/CoreBundle/config/cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,7 @@ services:
class: Symfony\Component\Cache\Adapter\TagAwareAdapter
arguments: [ '@pimcore.cache.adapter.doctrine_dbal', null ]

pimcore.cache.adapter.redis_tag_aware:
class: Symfony\Component\Cache\Adapter\RedisTagAwareAdapter
lazy: true
arguments:
- null
- null
- 0
- '@cache.default_marshaller'
tags:
- { name: cache.pool, provider: cache.default_redis_provider, clearer: cache.default_clearer }
- { name: monolog.logger, channel: cache }
calls:
- [setLogger, ['@logger']]
pimcore.cache.adapter.redis_tag_aware: '@cache.adapter.redis_tag_aware'

pimcore.cache.pool.app:
class: Symfony\Component\Cache\Adapter\ProxyAdapter
Expand Down
2 changes: 2 additions & 0 deletions bundles/CoreBundle/config/pimcore/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ framework:
pimcore_type: '*'
pimcore_id: '*'
allow_relative_links: true
allow_relative_medias: true
allow_elements:
span : [ 'class', 'style', 'id' ]
div : [ 'class', 'style', 'id' ]
Expand All @@ -79,6 +80,7 @@ framework:
li: ['class', 'style', 'id']
ol: ['class', 'style', 'id']
br: ''
img: ['alt', 'style', 'src']
pimcore.translation_sanitizer:
allow_attributes:
pimcore_type: '*'
Expand Down
8 changes: 3 additions & 5 deletions bundles/CustomReportsBundle/src/Tool/Config/Dao.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,9 @@ public function delete(): void
protected function prepareDataStructureForYaml(string $id, mixed $data): mixed
{
return [
'pimcore' => [
'custom_report' => [
'definitions' => [
$id => $data,
],
'pimcore_custom_reports' => [
'definitions' => [
$id => $data,
],
],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function seopanelTreeAction(
// make sure document routes are also built for unpublished documents
$documentRouteHandler->setForceHandleUnpublishedDocuments(true);

$document = Document::getById($allParams['node']);
$document = Document::getById((int) $allParams['node']);

$documents = [];
if ($document->hasChildren()) {
Expand Down
2 changes: 1 addition & 1 deletion bundles/TinymceBundle/public/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pimcore.bundle.tinymce.editor = Class.create({
base_url: '/bundles/pimcoretinymce/build/tinymce',
suffix: '.min',
convert_urls: false,
extended_valid_elements: 'a[name|href|target|title|pimcore_type|pimcore_id],img[style|longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align|pimcore_type|pimcore_id]',
extended_valid_elements: 'a[name|href|target|title|pimcore_id|pimcore_type],img[style|longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align|pimcore_id|pimcore_type]',
init_instance_callback: function (editor) {
editor.on('input', function (eChange) {
const charCount = tinymce.activeEditor.plugins.wordcount.body.getCharacterCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ If you would like to know more about the installation process or if you are havi

## Automating the Installation Process

For more information about ways to automate the installation process, have a look on [Advanced Installation Topics](../02_Advanced_Installation_Topics.md).
For more information about ways to automate the installation process, have a look on [Advanced Installation Topics](../02_Advanced_Installation_Topics/README.md).
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This launches the interactive installer with a few questions. Make sure that you

:::info

Pimcore allows a fully automated installation process. Read more here: [Advanced Installation Topics](../02_Advanced_Installation_Topics.md)
Pimcore allows a fully automated installation process. Read more here: [Advanced Installation Topics](../02_Advanced_Installation_Topics/README.md)

:::

Expand Down Expand Up @@ -98,7 +98,7 @@ messages to the bus and run them afterward immediately from the queue. However,
Keep in mind that the cron job has to run as the same user as the web interface to avoid permission issues (eg. `www-data`).

For information about how to handle failed jobs, see this [section](../01_Symfony_Messenger.md).
For information about how to handle failed jobs, see this [section](../02_Advanced_Installation_Topics/01_Symfony_Messenger.md).

## Caching
Make sure to use any sort of [caching](https://pimcore.com/docs/platform/Pimcore/Development_Tools_and_Details/Cache/) to improve performance. We recommend Redis cache storage.
Expand All @@ -109,8 +109,8 @@ If you would like to know more about the installation process or if you are havi

## 7. Further Reading

- [Symfony Messenger](../01_Symfony_Messenger.md)
- [Advanced Installation Topics](../02_Advanced_Installation_Topics.md)
- [Symfony Messenger](../02_Advanced_Installation_Topics/01_Symfony_Messenger.md)
- [Advanced Installation Topics](../02_Advanced_Installation_Topics/README.md)
- [Apache Configuration](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/01_Apache_Configuration.md)
- [Nginx Configuration](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/02_Nginx_Configuration.md)
- [Database Setup](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/05_DB_Setup.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ Attention: The bundles will be added to `config/bundles.php` automatically.

Available bundles for installation:

- [PimcoreApplicationLoggerBundle](../18_Tools_and_Features/17_Application_Logger.md)
- [PimcoreCustomReportsBundle](../18_Tools_and_Features/29_Custom_Reports.md)
- [PimcoreGlossaryBundle](../18_Tools_and_Features/21_Glossary.md)
- PimcoreSeoBundle (for SEO-related topics: [Robots.txt](../18_Tools_and_Features/38_Robots.txt.md), [Sitemaps](../18_Tools_and_Features/39_Sitemaps.md) and [Redirects](../02_MVC/04_Routing_and_URLs/04_Redirects.md))
- [PimcoreApplicationLoggerBundle](../../18_Tools_and_Features/17_Application_Logger.md)
- [PimcoreCustomReportsBundle](../../18_Tools_and_Features/29_Custom_Reports.md)
- [PimcoreGlossaryBundle](../../18_Tools_and_Features/21_Glossary.md)
- PimcoreSeoBundle (for SEO-related topics: [Robots.txt](../../18_Tools_and_Features/38_Robots.txt.md), [Sitemaps](../../18_Tools_and_Features/39_Sitemaps.md) and [Redirects](../../02_MVC/04_Routing_and_URLs/04_Redirects.md))
- PimcoreSimpleBackendSearchBundle (for default search functionality in Backend UI interface)
- [PimcoreStaticRoutesBundle](../02_MVC/04_Routing_and_URLs/02_Custom_Routes.md)
- [PimcoreStaticRoutesBundle](../../02_MVC/04_Routing_and_URLs/02_Custom_Routes.md)
- [PimcoreTinymceBundle](https://github.com/pimcore/pimcore/blob/11.x/bundles/TinymceBundle/README.md) (for default WYSIWYG editor)
- [PimcoreUuidBundle](../19_Development_Tools_and_Details/19_UUID_Support.md)
- [PimcoreUuidBundle](../../19_Development_Tools_and_Details/19_UUID_Support.md)
- PimcoreWordExportBundle (for import/export functionality for translations in Word format)
- PimcoreXliffBundle (for import/export functionality for translations in Xliff format)

Expand Down Expand Up @@ -156,4 +156,4 @@ pimcore:
## Office document preview
The feature for displaying a [preview of documents](../04_Assets/03_Working_with_Thumbnails/05_Document_Thumbnails.md) directly in Pimcore is optional. To use it, you must install either [Gotenberg](../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#gotenberg) or [LibreOffice](../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#libreoffice-pdftotext-inkscape-) according to your preference.
The feature for displaying a [preview of documents](../../04_Assets/03_Working_with_Thumbnails/05_Document_Thumbnails.md) directly in Pimcore is optional. To use it, you must install either [Gotenberg](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#gotenberg) or [LibreOffice](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#libreoffice-pdftotext-inkscape-) according to your preference.
12 changes: 6 additions & 6 deletions doc/01_Getting_Started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This section provides a quick getting started tutorial for Pimcore and covers th
1. Installation of Pimcore:
- via [Docker](../01_Getting_Started/00_Installation/00_Docker_Based_Installation.md)
- via [Webserver](../01_Getting_Started/00_Installation/01_Webserver_Installation.md)
2. [Symfony Messenger and How to Handle Failed Jobs](./01_Symfony_Messenger.md)
3. [Advanced Installation Topics](./02_Advanced_Installation_Topics.md)
4. [Directory Structure of Pimcore](./03_Directory_Structure.md)
5. [Configuration](./04_Configuration.md)
6. [Architecture Overview](./05_Architecture_Overview.md)
7. [Creating your First Project](./06_Create_a_First_Project.md)
2. [Advanced Installation Topics](./02_Advanced_Installation_Topics/README.md):
- [Symfony Messenger and How to Handle Failed Jobs](./02_Advanced_Installation_Topics/01_Symfony_Messenger.md)
3. [Directory Structure of Pimcore](./03_Directory_Structure.md)
4. [Configuration](./04_Configuration.md)
5. [Architecture Overview](./05_Architecture_Overview.md)
6. [Creating your First Project](./06_Create_a_First_Project.md)

4 changes: 2 additions & 2 deletions doc/19_Development_Tools_and_Details/09_Cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ framework:
pools:
pimcore.cache.pool:
public: true
tags: true
#tags: true
default_lifetime: 31536000 # 1 year
#adapter: pimcore.cache.adapter.doctrine_dbal
#provider: 'doctrine.dbal.default_connection'
adapter: pimcore.cache.adapter.redis_tag_aware
adapter: cache.adapter.redis_tag_aware
provider: 'redis://localhost'
```
Expand Down
11 changes: 11 additions & 0 deletions doc/20_Extending_Pimcore/13_Bundle_Developers_Guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ For bundles, translations should be stored in the `Resources/translations/` dire

Example: admin.en.yml or messages.en.yml

#### Translations Domain
A translation domain is only considered valid when it is registered as follows:
```yaml
pimcore:
translations:
domains:
- site_1
- site_2
````

Then only translations stored in a dedicated domain table e.g. `translations_DOMAIN` are used by the Pimcore translation service.

### Security / Authentication

Expand Down
3 changes: 3 additions & 0 deletions doc/22_Administration_of_Pimcore/02_Cleanup_Data_Storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ amount of items in your recycle bin:
mysql -e "TRUNCATE TABLE ###.recyclebin;"
rm -r var/recyclebin
```

**WARNING: The recycle bin is an administrative tool that displays any user's deleted elements.
Due to the nature and complexity of the elements deletion and restoration process, this tool should be reserved for administrator and advanced users**
14 changes: 11 additions & 3 deletions doc/22_Administration_of_Pimcore/07_Users_and_Roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In Pimcore, there are two levels of user permissions:
1) Permissions on system components,
2) Permissions on data elements (Assets, Data Objects, and Documents).

Permissions can be granted to roles or individual users.
Permissions can be granted to individual users or groups of users (called "roles" in Pimcore).
The following paragraphs describe how and where permissions can be set and how they will or will not affect each other.

It is not mandatory to use roles, permissions can be granted to users directly. However, it is advised to use roles if there is a larger user group to manage. In the `Users/Roles` settings tab it can be decided which permissions are granted to that user or role. An individual user has a few more general settings than the role.
Expand Down Expand Up @@ -50,7 +50,7 @@ The following list outlines what the different system permissions (available for
* **Notes & Events**: Notes & Events are visible
* **Objects**: Objects tree is visible
* **Predefined Properties**: User can create and modify predefined properties
* **Recycle Bin**: User has access to recycle bin
* **Recycle Bin**: User has access to the recycle bin and see all the deleted elements (even by other users).
* **Redirects**: User can create and modify redirects
* **Reports**: User has access to reports module
* **Seemode**: Seemode available/not available for user
Expand Down Expand Up @@ -95,7 +95,15 @@ The user permissions on element basis are summed up as follows:
Individual users are granted access to all defined workspaces for any role they incorporate. In addition to that, users can have their own workspaces. These are added to the permissions granted by roles.

For example, a role `myRole` has been granted list and view access to `/home/myPath`. The user editor incorporates the role `myRole` and thereby inherits all workspace settings from the role.
In case the editor has his own workspace settings on `/home/myPath`, these permissions are added to permissions from any role they incorporate. A permission granted by any role can not be rescinded for a single user.
In case the editor has his own workspace settings on `/home/myPath`, these permissions are added to permissions from any role they incorporate.

:::caution

Be aware that if individual permissions granted to a user are different from the ones granted by its role for the same workspace, user permissions win over the ones attributed to the role. This implies that if the user has fewer permissions granted as an individual than through its role, the role's permissions will also be overruled.

For example, a user has only `List` permissions on a workspace, but its role defines `List`, `View`, `Save`, and `Publish` permissions for the same workspace. Because its individual permissions are restricted, this user will only have the possibility to see the workspace tree allowed by its `List` permissions.

:::

It is also possible to restrict access to localized fields on a language level. By default, users can view and edit (as long as they also have sufficient object permissions) all localized fields. This can now be restricted to a subset of languages.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,8 @@ framework:
pools:
pimcore.cache.pool:
public: true
tags: true
default_lifetime: 31536000 # 1 year
adapter: pimcore.cache.adapter.redis_tag_aware
adapter: cache.adapter.redis_tag_aware
provider: 'redis://localhost'
```
Expand Down
22 changes: 13 additions & 9 deletions doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Upgrade Notes - Pimcore 11.0.0
# Upgrade Notes

## API
## Pimcore 11.0.6
- Properties of `Pimcore\Model\DataObject\Data\Link` are nullable now.

## Pimcore 11.0.0
### API
#### [General] :

- **Attention:** Added native php types for argument types, property types, return types and strict type declaration where possible. Double check your classes which are extending from Pimcore classes and adapt if necessary.
Expand Down Expand Up @@ -66,7 +70,7 @@
- Bumped `league/flysystem-bundle` minimum requirement to ^3.0 (which introduces `directoryExists()`,`has()` methods and fixes support for `directory_visibility` configuration option). Please bump the Flysystem Adapters requirement accordingly to `^3.0` in your project `composer.json`.

-----------------
## Admin UI
### Admin UI
#### [General] :

- Removed `adminer` as built-in database management tool.
Expand Down Expand Up @@ -99,7 +103,7 @@


-----------------
## Bundles
### Bundles
#### [Bundles General] :

- Removed support for loading bundles through `extensions.php`.
Expand Down Expand Up @@ -181,7 +185,7 @@
- Service ids changed from `pimcore.newsletter` to `pimcore_newsletter` e.g. `pimcore_newsletter.document.newsletter.factory.default`


## Core
### Core

#### [Commands] :

Expand Down Expand Up @@ -262,7 +266,7 @@ pimcore:
- `EcommerceFrameworkBundle\Tracking\TrackingManager` requires session from request stack.

-----------------
## Ecommerce
### Ecommerce
#### [Ecommerce General] :

- Ecommerce bundle has been moved into a package `pimcore/ecommerce-bundle`. If you wish to continue using the ecommerce framework, then please require the package in your composer.json and install it after enabling in `config/bundles.php`.
Expand All @@ -287,7 +291,7 @@ pimcore:
- Changed return type-hints of `CheckoutableInterface` methods `getOSPrice`, `getOSPriceInfo`, `getOSAvailabilityInfo`, `getPriceSystemName`, `getAvailabilitySystemName`, `getPriceSystemImplementation`, `getAvailabilitySystemImplementation` to be non-nullable.

-----------------
## Elements
### Elements

#### [All] :

Expand Down Expand Up @@ -476,7 +480,7 @@ pimcore_seo:
- Removed [deprecated and legacy `<iframe>` attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe): `frameborder`, `webkitAllowFullScreen`, `mozallowfullscreen`, and `allowfullscreen` for YouTube, Vimeo, and DailyMotion embeds.

-----------------
## Infrastructure
### Infrastructure
#### [PHP Options] :

- Removed setting following options: `memory_limit`, `max_execution_time`, `max_input_time` and `display_errors`
Expand All @@ -491,7 +495,7 @@ pimcore_seo:
- Replace deprecated `Symfony\Component\HttpFoundation\RequestMatcher` with `Symfony\Component\HttpFoundation\ChainRequestMatcher`

-----------------
## Tools
### Tools
#### [Application Logger] :

- Removed deprecated `PIMCORE_LOG_FILEOBJECT_DIRECTORY` constant, since flysystem is used to save/get fileobjects. Please make sure to adapt your code and migrate your fileobjects manually.
Expand Down
8 changes: 7 additions & 1 deletion models/Asset/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,14 @@ public function getPreviewImage(bool $force = false)
break;
}

$width = $tileThumb->getWidth();
$height = $tileThumb->getHeight();
if (!$width || !$height) {
break;
}

$tile = imagecreatefromstring(stream_get_contents($stream));
imagecopyresampled($collage, $tile, $offsetLeft, $offsetTop, 0, 0, $squareDimension, $squareDimension, $tileThumb->getWidth(), $tileThumb->getHeight());
imagecopyresampled($collage, $tile, $offsetLeft, $offsetTop, 0, 0, $squareDimension, $squareDimension, $width, $height);

$count++;
if ($count % $colums === 0) {
Expand Down
2 changes: 2 additions & 0 deletions models/Asset/Image/Thumbnail/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ public static function process(Asset $asset, Config $config, mixed $fileSystemPa
}

if (is_resource($fileSystemPath)) {
$fileSystemPathStream = $fileSystemPath;
$fileSystemPath = self::getLocalFileFromStream($fileSystemPath);
@fclose($fileSystemPathStream);
}

if (!file_exists($fileSystemPath)) {
Expand Down
2 changes: 1 addition & 1 deletion models/Asset/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ public static function getImageThumbnailByArrayConfig(array $config): null|Image

//check if high res image is called

preg_match("@([^\@]+)(\@[0-9.]+x)?\.([a-zA-Z]{2,5})@", $config['filename'], $matches);
preg_match("@([^\@]+)(\@[0-9.]+x)?\.([^\.]+)\.([a-zA-Z]{2,5})@", $config['filename'], $matches);

if (empty($matches) || !isset($matches[1])) {
return null;
Expand Down
Loading

0 comments on commit ddb07b2

Please sign in to comment.