Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failed #539

Closed
AlexanderSupp opened this issue Oct 23, 2023 · 54 comments
Closed

Installation failed #539

AlexanderSupp opened this issue Oct 23, 2023 · 54 comments

Comments

@AlexanderSupp
Copy link

Steps to reproduce the issue

Install the package. Directly or via download.

Expected result

Actual result

Warning
Joomla\Filesystem\File::delete: Failed deleting inaccessible file weblinks.php
Package Update: There was an error installing an extension: plg_finder_weblinks.zip
danger
Error installing package

System information (as much as possible)

joomla 4.4 and joomla 5.0
PHP Version | 8.1.24

Additional comments

Warning
Joomla\Filesystem\File::delete: Failed deleting inaccessible file weblinks.php
Package Update: There was an error installing an extension: plg_finder_weblinks.zip
danger
Error installing package

@joomdonation
Copy link
Contributor

Hello

From my experience, there are permission issues with the file weblinks.php (the system tries to delete the file during update process because the file is not needed with new plugin structure)

You can send super user account of your site to my email tuanpn@joomdonation.com . I will try to to check and update the extension for you.

@jojo12
Copy link

jojo12 commented Oct 23, 2023

I think this must be repared in the package, not in the backend!

@joomdonation
Copy link
Contributor

Honestly, I'm unsure. I tried to update from my local installation and it worked well. I remember there was an issue like that long time ago due to permission issue, see joomla/joomla-cms#23504

Sometime, I also got the same problem with installing/updating my extensions on our website and I documented a temp solution https://membershipprodoc.joomservices.com/troubleshooting/fix-error-deleting-inaccessible-file

If you got that same issue, maybe try that solution to see if it addressed the issue.

@dsimonse
Copy link

Have the same issue with Joomla4.4.0 and PHP8.0.11
Where is this file weblinks.php located?

@joomdonation
Copy link
Contributor

There are some files which needs to be deleted during update process

'/plugins/search/weblinks/weblinks.php',
'/plugins/finder/weblinks/weblinks.php',
'/plugins/system/weblinks/weblinks.php',

However, if It is not permission issue with one of these files, I really don't know why the error happens.

@joomdonation
Copy link
Contributor

I wonder if one of you here could give me access to the site so that I can run the update to see why the error happens? That would help us to find the root reasons of the error.

@dsimonse
Copy link

dsimonse commented Oct 23, 2023 via email

@joomdonation
Copy link
Contributor

@dsimonse The last one was not deleted due to a typo in the code. Could you please try to install this updated package manually to see if the Failed deleting inaccessible file weblinks.php still happens ?

pkg-weblinks-4.3.0.zip

@jochenpa
Copy link

jochenpa commented Oct 23, 2023

Does not work for me.
I have a single file still there:

administrator/components/com_weblinks/helpers/weblinks.php
# ls -l administrator/components/com_weblinks/helpers/weblinks.php
-rw-r--r-- 1 fer fer 520 23. Okt 16:15 administrator/components/com_weblinks/helpers/weblinks.php
# ls -dl administrator/components/com_weblinks/helpers
drwxr-xr-x 2 fer fer 4096 26. Aug 11:38 administrator/components/com_weblinks/helpers/

The web server (apache2) runs as user "fer" and group "fer".

Jochen

@jazzmang
Copy link

I see the same issue on Joomla 4.4.0 and PHP 8.1.24, even with the new package.

The only weblinks.php left is the administrator/components/com_weblinks/helpers/weblinks.php; permissions are fine; there should be no reason it cannot delete it.

@joomdonation
Copy link
Contributor

The file administrator/components/com_weblinks/helpers/weblinks.php does not need to be deleted. It must be there for backward compatible reasons.

So it is not clear to me why the error Failed deleting inaccessible file weblinks.php still happens unless someone gives me access to the site to check directly there.

@jochenpa
Copy link

Are you trying to delete a file which already is deleted?

@joomdonation
Copy link
Contributor

@jochenpa No, I'm not that bad. The code checks to see if the file exists and if Yes, delete it. See https://github.com/joomla-extensions/weblinks/blob/4.0-dev/src/administrator/components/com_weblinks/script.php#L66-L70

Here are links to list of files need to be deleted during update process https://github.com/joomla-extensions/weblinks/blob/4.0-dev/src/administrator/components/com_weblinks/script.php#L41-L59

@dsimonse
Copy link

dsimonse commented Oct 23, 2023 via email

@joomdonation
Copy link
Contributor

I tried to install/update both on my local Joomla installation and could not see the error myself. So I really do not have any clue why the error happens, sorry. I don't say that there is no error, but without seeing it myself, it's hard for me to know what's the reason and get it corrected.

@alikon
Copy link
Contributor

alikon commented Oct 23, 2023

dunno if it is the root cause
but i've used in joomla/joomla-cms#41865 and in joomla/joomla-cms#42088
if (is_file(JPATH_ROOT . $file)) {
instead of
if (File::exists(JPATH_ROOT . $file)) {

@jazzmang
Copy link

For me, the Administrator Component and Site Module shows 4.3.0; everything else is still on 4.0.1.

I've run the Akeeba permission fix, and there's no difference. All the files in the https://github.com/joomla-extensions/weblinks/blob/4.0-dev/src/administrator/components/com_weblinks/script.php#L41-L59 are removed, but I still get the error if I try to install again.

@dsimonse
Copy link

dsimonse commented Oct 23, 2023 via email

@joomdonation
Copy link
Contributor

@dsimonse tuanpn@joomdonation.com is my email. Thanks for your help !

@joomdonation
Copy link
Contributor

@alikon I looked at your PR, you added a is_file check before calling delete, so it is a different issue, I think

@joomdonation
Copy link
Contributor

@dsimonse I received access to your site. Will take time for me to debug to figure out the reasons of the issue and get it sorted. As it is night time here now for me 10:30pm, I hope you can leave the access open for about 24 hours. Thanks !

@joomdonation
Copy link
Contributor

Update: I think I figured out the reasons. During the update, Joomla installer track and delete the old files (from old plugin structure) itself. So the weblinks extension does not need to track and delete the old files itself.

As the files were deleted by weblinks and Joomla installer tries to delete the old files/folders without checking if these files/folders still exist, it causes the error which you reported

I will have to check it more, but the workaround for this problem could be:

  • Download and install old version of weblinks extension https://downloads.joomla.org/extensions/weblinks/4-0-1 (so that the old files are restored and we do not get error when Joomla tries to delete these old files)
  • Then update to this updated package of weblinks 4.3.0

pkg-weblinks-4.3.0.zip

@dsimonse : I updated your site to latest package of weblinks. So you can disable the account you created for me now.

@dsimonse
Copy link

dsimonse commented Oct 23, 2023 via email

@jazzmang
Copy link

Update: I think I figured out the reasons. During the update, Joomla installer track and delete the old files (from old plugin structure) itself. So the weblinks extension does not need to track and delete the old files itself.

As the files were deleted by weblinks and Joomla installer tries to delete the old files/folders without checking if these files/folders still exist, it causes the error which you reported

I will have to check it more, but the workaround for this problem could be:

* Download and install old version of weblinks extension https://downloads.joomla.org/extensions/weblinks/4-0-1 (so that the old files are restored and we do not get error when Joomla tries to delete these old files)

* Then update to this updated package of weblinks 4.3.0

pkg-weblinks-4.3.0.zip

@dsimonse : I updated your site to latest package of weblinks. So you can disable the account you created for me now.

This worked for me, everything now shows version 4.3.0 and no error on the 4.30 update.

@GASOLINE
Copy link

Same here, can't install. Error message, see topicstarter.

@gpraceman
Copy link

The workaround did not work for me. The weblinks.php files are not restored with rolling back to 4.0.1 and I still get the same error with a 4.3.0 install.

@fontanil
Copy link

fontanil commented Oct 23, 2023

Hi, the last version works for me. (Joomla! 5.0.0)
Thanks Tuan!

@FrankReisenhofer
Copy link

Same here: The workaround is not working for me. I got the error [1]

[1]
Warnung
Joomla\Filesystem\File::delete: Failed deleting inaccessible file weblinks.php
Paket Update: Bei der Installation der Erweiterung trat ein Fehler auf: plg_finder_weblinks.zip

@nickpsal
Copy link

same problem here when i tried to install it manualy i get thiw error
Joomla\Filesystem\File::delete: Failed deleting inaccessible file weblinks.php
Package Update: There was an error installing an extension: plg_finder_weblinks.zip

@suchymdt
Copy link

Joomla 5.0.0, PHP 8.2.7

  1. Download old version of weblinks extension https://downloads.joomla.org/extensions/weblinks/4-0-1
  2. Unzip pkg-weblinks-4.0.1
  3. Unzip plg_finder_weblinks.zip and upload manually to plugins/finder/weblinks
  4. Unzip plg_search_weblinks.zip and upload manually to plugins/search/weblinks
  5. Unzip plg_system_weblinks.zip and upload manually to plugins/system/weblinks
  6. Unzip plg_editors-xtd_weblink.zip and upload manually to plugins/editors-xtd/weblink
  7. Download and install pkg-weblinks-4.3.0.zip

@fontanil
Copy link

You can simply reinstall version 4.0.1, then update to 4.3.0.

@suchymdt
Copy link

It didn't work for me, so I did as above

@joomdonation
Copy link
Contributor

@FrankReisenhofer @nickpsal @suchymdt Normally, when upgrade failed, you should be able to reinstall @4.0.1 , then update to 4.3.0 as I mentioned in the earlier comment #539 (comment)

If for some reasons it is not working for you, you can give me access to your site tuanpn@joomdonation.com so that I can help with the update

Regards,

Tuan

@FrankReisenhofer
Copy link

@joomdonation : Good news :-). I performed the suggested steps a second time and now it worked fine. Many thanks for your quick help!

@joomdonation
Copy link
Contributor

Great. Thanks for confirming @FrankReisenhofer

@nickpsal
Copy link

it works fine now

@woluweb
Copy link

woluweb commented Oct 24, 2023

I have tried the workaround, namely installing version 4.0.1 (even several times in a row) and then reinstalling 4.3.0 but I still get

Joomla\Filesystem\File::delete: Failed deleting inaccessible file weblinks.php
Package Update: There was an error installing an extension: plg_finder_weblinks.zip

Edit: all J4.4.0 websites btw

@joomdonation
Copy link
Contributor

@woluweb was the installation of 4.0.1 success? And could you please make sure you download the right 4.3.0 package from this link https://github.com/joomla-extensions/weblinks/files/13073037/pkg-weblinks-4.3.0.zip ?

@woluweb
Copy link

woluweb commented Oct 24, 2023

mmmh, tricky.
I had tries many times

  • installing 4.0.1
  • and then updating to 4.3.0
    There I always had the error.

Now that I don't "update to 4.3.0" but "install 4.3.0" it seems to work... but on some sites I had to redo the whole process twice (reinstall 4.0.1 and then reinstall 4.3.0)

My 5 concerned sites are now updated

@joomdonation
Copy link
Contributor

@woluweb It's because when you use Joomla updater, it is still using the old weblinks package, sorry. I'm still waiting for help to update the new package to offical download server.

@jochenpa
Copy link

Hello

It worked for me.

Reinstalling 4.0.1
Installing changed 4.3.0
No more error messages.

Thanks.

@GASOLINE
Copy link

Hello

It worked for me.

Reinstalling 4.0.1 Installing changed 4.3.0 No more error messages.

Thanks.

That is not a solution for the avarage user that does not even know that github exists.

@joomdonation
Copy link
Contributor

@GASOLINE I'm sorry but part of this process is controlled by Joomla core installer process (which weblinks has no control to). So if you face this issue, re-installing 4.0.1 before updating to latest package would be the required steps. Sadly there is no simpler option.

@joomdonation
Copy link
Contributor

So we made a new release 4.3.1 which fixes the errors with the update. If anyone updated from older version to 4.3.0 and got error, please use the solution below :

If anyone has difficulty with the update, feel free to send an email to tuanpn@joomdonation.com and I will be happy to assist. Apologize for my mistake with 4.3.0 release and sorry for the inconvenience.

@dsimonse
Copy link

dsimonse commented Oct 24, 2023 via email

@dsimonse
Copy link

Hi Tuan, Get the error that downgrade is not allowed. //Dennis Från: Tuan Pham Ngoc Skickat: den 24 oktober 2023 12:06 Till: joomla-extensions/weblinks @.> Kopia: dsimonse @.>; Mention @.> Ämne: Re: [joomla-extensions/weblinks] Installation failed (Issue #539) So we made a new release 4.3.1 which fixes the errors with the update. If anyone updated from older version to 4.3.0 and got error, please use the solution below : * Download weblinks 4.0.1 at https://downloads.joomla.org/extensions/weblinks/4-0-1 and re-install it * Then you can update to latest release 4.3.1 from administrator area of your site using Joomla! updater If anyone has difficulty with the update, feel free to send an email to @. @.> and I will be happy to assist. Apologize for my mistake with 4.3.0 release and sorry for the inconvenience. — Reply to this email directly, view it on GitHub <#539 (comment)> , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDPNYQAIVH7I5FVVDXEWPLYA6HHHAVCNFSM6AAAAAA6L2MHXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWHEYDQMZZGQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AEDPNYQ6HI2FVGKDF2X2MPDYA6HHHA5CNFSM6AAAAAA6L2MHXWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJ5F4GU.gif Message ID: @. @.***> >

But a standard joomla-update went well!

@Memotas
Copy link

Memotas commented Oct 24, 2023

Hello,

After reinstalling Weblinks 4.0.1, the problem of updating and/or installing version 4.3.1 is resolved.

Joomla: 4.4.0
PHP: 8.2.11

@joomdonation
Copy link
Contributor

@dsimonse Usually, when upgrade to 4.3.0 fail, you should be allowed to re-install 4.0.1. If that's not allowed, you can give me access to your site and I will be happy to assist to get the issue sorted.

@dsimonse
Copy link

dsimonse commented Oct 24, 2023 via email

@joomdonation
Copy link
Contributor

@dsimonse OK. So do you need assist? Or everything is OK for you now ?

@Memotas
Copy link

Memotas commented Oct 24, 2023

Thank you. Problem

@dsimonse Usually, when upgrade to 4.3.0 fail, you should be allowed to re-install 4.0.1. If that's not allowed, you can give me access to your site and I will be happy to assist to get the issue sorted.

Thank you. Problem solved.

@dsimonse
Copy link

dsimonse commented Oct 24, 2023 via email

@gpraceman
Copy link

4.3.1 worked for me.

@joomdonation
Copy link
Contributor

OK. So no-one else got installation/update issue in the last few days, so I assume the issue was sorted with the last release 4.3.1. Therefore, I'm closing this issue.

If anyone has similar issue, follow the instructions here #539 (comment) to get the issue sorted. And I'm available for assist if it is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests