- π«π·France nanak Sarlat-la-CanΓ©da
Hi, attached a patch inspired by the above MR, using a service decorator, available only if stage file proxy is installed, and works on the first request.
Supports stage file proxy >= 2.0.3, as the decorated service was introduced in the version.
About your remark in the previous comment "I'm guessing that this piece of code will need some extra checking for stage_file_proxy to fetch the original image before proceeding.": this is the case, the event subscriber fires and fetches the image before the drimage controller comes into play
- Status changed to RTBC
over 1 year ago 8:41pm 20 November 2023 - π§πͺBelgium mollux
@nanak nice approach, this works as expected, and works on the first request.
tested together with stage_file_proxy 2.1.2
- Status changed to Needs work
over 1 year ago 1:31pm 22 November 2023 - π§πͺBelgium weseze
A few remarks before we can get this in:
1/ Do we need the "declare(strict_types = 1);"? I'd prefer not to do this.
2/ Parts of the code require PHP8+. We still support Drupal9, which does not require PHP8. Can we rewrite the code in the patch to be compatible with PHP7? If not, we will need to also patch the info.yml and remove the D9.5 compatibility.
- Status changed to Needs review
over 1 year ago 9:12pm 22 November 2023 - π«π·France nanak Sarlat-la-CanΓ©da
According to https://www.drupal.org/docs/getting-started/system-requirements/php-requ... β , Drupal 9.5 is no longer marked as compatible with PHP 7, and supports PHP 8.0 & 8.1.
Nevertheless, the attached patch should be compatible with PHP 7.4, and I removed the strict types check.
-
weseze β
committed 61e4cec9 on 2.x authored by
Christian.wiedemann β
Issue #3168344 by Christian.wiedemann, nanak, weseze, mollux: Stage File...
-
weseze β
committed 61e4cec9 on 2.x authored by
Christian.wiedemann β
- Status changed to Fixed
over 1 year ago 9:08am 28 November 2023 - π§πͺBelgium weseze
Seems good to me. Haven't tested since I don't use stage_file_proxy module. I'm assuming it works ;)
Will include this in the next release. - π§πͺBelgium dieterholvoet Brussels
Are we sure omitting the
class
property in the service definition is supported in Drupal 9.3, which is the minimum supported version by this module? I know uppercase service names are only allowed since Drupal 9.5 β , but I had no idea omitting the class property was even allowed. We should probably change the service ID and add theclass
property here. - π§πͺBelgium weseze
@DieterHolvoet: Have you got any D9.3 installations to test on? (I don't)
Might be easier to just make a quick new release and up our minimum requirements to D9.5? - π«π·France nanak Sarlat-la-CanΓ©da
I've been using class names as service id before 9.5 and it used to work, but I've made a mistake: this won't work with Drupal 9 at all due to the '@.inner' notation, which got introduced in Symfony 5.1, so only available from Drupal 10.0 onward.
Attached, a patch using the syntax supported by both Drupal 9 and Drupal 10. I tried it on a Drupal 9.3 fresh install, and the service could properly be registered this time. Sorry for the mistake.
- π«π·France nanak Sarlat-la-CanΓ©da
Note that the above patch applies on top of #10
-
weseze β
committed cb3ce734 on 2.x authored by
nanak β
Issue #3168344 by nanak, weseze: Stage File Proxy not working with...
-
weseze β
committed cb3ce734 on 2.x authored by
nanak β
- Status changed to Needs review
over 1 year ago 12:59pm 5 December 2023 - π§πͺBelgium dieterholvoet Brussels
You forgot to update the service ID in
DrimageServiceProvider
, breaking any sites without Stage File Proxy installed. I attached a patch fixing the issue. -
weseze β
committed 90eea2ab on 2.x authored by
DieterHolvoet β
Issue #3168344 by DieterHolvoet, weseze: Stage File Proxy not working...
-
weseze β
committed 90eea2ab on 2.x authored by
DieterHolvoet β
- Status changed to Fixed
over 1 year ago 1:56pm 5 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.