๐Ÿ‡ฎ๐Ÿ‡ณIndia @jincy_k

Account created on 20 July 2012, over 12 years ago
#

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณ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 dblog

Solution : 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.

๐Ÿ‡ฎ๐Ÿ‡ณIndia jincy_k

@ ady1503 โ†’ Through a simple workaround in the code, I am able to fix this problem when I select the private file system, 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();

@ Anybody โ†’ This may not be a perfect solution, though.

Given that the issue, https://www.drupal.org/project/pwa/issues/3313423 ๐Ÿ› Introduce the ability to render the PWA App Icon through the private file system Closed: won't fix - PWA App image does not render on a private file system exists, the proposed workaround can be taken as a temporary solution.

As long as schema set is "Public" for the upload, at line 305 of the same file,
'#upload_location' => 'public://pwa/',
it can always return $files_path, public://image.

If I'm making the wrong assumptions, kindly correct me.

๐Ÿ‡ฎ๐Ÿ‡ณIndia jincy_k

@ Anybody โ†’ , Many thanks. I totally agree with you, but due to my present hectic schedule I am unable to get involved. If anyone could help, please take this into consideration.
@ ady1503 โ†’ I'm not able to reproduce all of the issues listed. I'm testing locally (localhost without a valid ssl certificate). I'm getting this warning while deleting the image
(Warning: unlink(/app/web/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 dblog

Solution : 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);
}
I'm seeing an issue in the path,'web' repeating twice in the dblog : (Warning: unlink(/app/web/web/sites/default/files/pwa/pwa_sample_1.png) which is again due to getcwd(). I wish I could fix this too. I'm trying..

๐Ÿ‡ฎ๐Ÿ‡ณIndia jincy_k

On a screen size of 767px, the three liner (Hamburger icon) display remains hidden, as shown in the tab/ipad preview at https://demo.zymphonies.com/free-theme/d8/drupal8-custom-theme/#. Please review MR and merge

๐Ÿ‡ฎ๐Ÿ‡ณIndia jincy_k

updated image file path with drupal service to fetch the correct path

๐Ÿ‡ฎ๐Ÿ‡ณIndia jincy_k

jincy_k โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia jincy_k

jincy_k โ†’ made their first commit to this issueโ€™s fork.

Production build 0.71.5 2024