- 🇩🇪Germany Anybody Porta Westfalica
@SocialNicheGuru could you perhaps reroll this as MR and add a test with public and private file system (2nd would fail without your fix) to ensure this is fixed now and in the future?
- 🇮🇳India jincy_k
@ SocialNicheGuru → Issue persist even after choosing private/public file system.
I'm getting this warning while deleting the image
(Warning: unlink(/app/web/sites/default/files/pwa/pwa_sample_1.png): No such file or directory in Drupal\pwa\Manifest->deleteImage() (line 158 of /app/web/modules/contrib/pwa/src/Manifest.php) in drupal dblogSolution : check if the file exist in the path before unlink. I've tested this code locally and got this warning fixed
if (file_exists($path)) {
unlink($path);
}Through a simple workaround in the code, I am able to fix all issues including below error while choosing private file system
TypeError: imagecopyresampled(): Argument #2 ($src_image) must be of type GdImage, bool given in imagecopyresampled() (line 424 of /home/***/public_html/***.com/web/modules/contrib/pwa/src/Form/ManifestConfigurationForm.php).see below :
In pwa/src/Form/ManifestConfigurationForm.php
$files_path = \Drupal::service('file_url_generator')->generateString("public://pwa") . '/';
$file_uri = $files_path . $file->getFilename();
$file_path = '/app'.$files_path . $file->getFilename();
$config->set('image', $file_uri)->save();I've committed my code changes to fix the issue, https://www.drupal.org/project/pwa/issues/3371404#comment-15179814 🐛 Defined App Image Icon isn't used Fixed
Please see my merge request, https://www.drupal.org/project/pwa/issues/3371404#comment-15179814 🐛 Defined App Image Icon isn't used Fixed
Please review and merge. - Status changed to Active
over 1 year ago 8:19am 10 August 2023 - 🇩🇪Germany Grevil
Further work on this should be done in 🐛 Defined App Image Icon isn't used Fixed . Let's use this issue to reintroduce the ability to use the private file system once again in the future.
- 🇩🇪Germany Anybody Porta Westfalica
Should be fixed, but is not a priority for our team. We're happy to review MR's, preferrably with tests. Until we need this ourselves or someone sponsors it, this isn't a priority for us.
- Status changed to Postponed
over 1 year ago 10:13am 10 August 2023 - last update
over 1 year ago 1 pass - @grevil opened merge request.
- last update
over 1 year ago 1 pass - 🇩🇪Germany Grevil
Note, that the current implementation, how the icon preview is rendered is incorrect instead we should use the approach similiar to https://www.drupal.org/node/2940031 → .
$uri = 'public:://test.img'; \Drupal::service('file_url_generator')->generateAbsoluteString($uri)
$uri can be both a private or public file path.
- 🇩🇪Germany Grevil
Internally discussed this with @Anybody, and there are no plans to support providing icons through the private file system. Through 🐛 Defined App Image Icon isn't used Fixed , the image is now always uploaded inside the public file system, no matter the stream wrapper's default scheme.
- Status changed to Closed: won't fix
about 1 year ago 8:01am 21 September 2023