Skip to content
Snippets Groups Projects

Resolve #2754273 "Image styles fails"

2 unresolved threads

Closes #2754273

Merge request reports

Closed by Vladimir RoudakovVladimir Roudakov 1 year ago (Apr 20, 2023 12:53pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
44 45 * {@inheritdoc}
45 46 */
46 47 public function processInbound($path, Request $request) {
47 $directory_path = $this->streamWrapperManager->getViaScheme('public')->getDirectoryPath();
48 if (strpos($path, '/' . $directory_path . '/styles/') === 0) {
49 $path_prefix = '/' . $directory_path . '/styles/';
48 $directory_path = NULL;
49 $files_base_url = Settings::get('file_public_base_url', '');
50 if ($files_base_url) {
51 $url_parts = parse_url($files_base_url);
52 if (isset($url_parts['path'])) {
53 $directory_path = $url_parts['path'];
54 }
50 55 }
56
57 if (!$directory_path) {
  • This applies when $files_base_url is set but without a directory. Imo, when files_base_url is set, it should always take $files_base_url, with what-ever directory-path is configured.

  • Please register or sign in to reply
  • 50 51 // disabled image derivatives will always be served through the menu system.
    51 52 // If clean URLs are enabled and the image derivative already exists, PHP
    52 53 // will be bypassed.
    53 $directory_path = $this->streamWrapperManager->getViaScheme('public')->getDirectoryPath();
    54 $directory_path = NULL;
    55 $files_base_url = Settings::get('file_public_base_url', '');
    56 if ($files_base_url) {
    57 $url_parts = parse_url($files_base_url);
    58 if (isset($url_parts['path'])) {
    59 $directory_path = $url_parts['path'];
    60 }
    61 }
    62
    63 if (!$directory_path) {
    • it seems wrong to duplicate this logic in two classes.

      Also, why is this not fixed inside of

      $directory_path = $this->streamWrapperManager->getViaScheme('public')->getDirectoryPath();

      This API should give me the correct value and respect the settings,no?

    • Please register or sign in to reply
  • Vladimir Roudakov added 177 commits

    added 177 commits

    Compare with previous version

  • Vladimir Roudakov changed target branch from 9.5.x to 10.1.x

    changed target branch from 9.5.x to 10.1.x

  • Vladimir Roudakov changed title from Resolve #2754273 "9.5.x image styles fails" to Resolve #2754273 "Image styles fails"

    changed title from Resolve #2754273 "9.5.x image styles fails" to Resolve #2754273 "Image styles fails"

  • Vladimir Roudakov changed target branch from 10.1.x to 9.5.x

    changed target branch from 10.1.x to 9.5.x

  • Please register or sign in to reply
    Loading