Mod installs fully, but breaks with error message and states to be not installed

Started by voom, June 10, 2022, 09:25:54 AM

Previous topic - Next topic

voom

I am pretty sure the problem was created by sth I did earlier, but that is not my point / question. It is more of a general knowledge question, since I probably would have to uninstall manually anyway.

I installed "Join Reason" mod, and it checked fine, then the installation process broke off with an error message (php error on white background). I went through every file and all mods are there. Also, the mod works fine, so no trouble in the db or so.

The only thing is, that the mod shows as not installed in the package manager. I suppose there is no way to set it to "installed" resp. it would not make sense, since uninstalling it the proper way would not work anyway? Or, since everything worked out, could it uninstall the proper way?

One thing I can't find, though, is a setting to activate / deactivate the function. But after I went through the files, I figure, there isn't one. That would mean, though, that I would have to uninstall it to deactivate it.

Shades.

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

voom

This seems to be - as I presumed - not a problem with the specific mod. The same happens now with every mod I install. This time, I could catch the error message appearing on blank page:

array(8) {
[0]=> array(3) { ["file"]=> string(70) "/var/www/vhosts/.../Sources/Subs.php" ["line"]=> int(6031) ["function"]=> string(9) "log_error" }
[1]=> array(3) { ["file"]=> string(70) "/var/www/vhosts/.../Sources/Subs.php" ["line"]=> int(5797) ["function"]=> string(11) "call_helper" }
[2]=> array(3) { ["file"]=> string(70) "/var/www/vhosts/./Sources/Load.php" ["line"]=> int(481) ["function"]=> string(21) "call_integration_hook" }
[3]=> array(3) { ["file"]=> string(74) "/var/www/vhosts/.../Sources/Packages.php" ["line"]=> int(1162) ["function"]=> string(14) "reloadSettings" }
[4]=> array(3) { ["file"]=> string(70) "/var/www/vhosts/.../Sources/Subs.php" ["line"]=> int(6051) ["function"]=> string(14) "PackageInstall" }
[5]=> array(3) { ["file"]=> string(74) "/var/www/vhosts/.../Sources/Packages.php" ["line"]=> int(91) ["function"]=> string(11) "call_helper" }
[6]=> array(3) { ["file"]=> string(71) "/var/www/vhosts/.../Sources/Admin.php" ["line"]=> int(499) ["function"]=> string(8) "Packages" }
[7]=> array(3) { ["file"]=> string(63) "/var/www/vhosts/.../index.php" ["line"]=> int(203) ["function"]=> string(9) "AdminMain" }
}
Error loop.

What does this tell me?

Oldiesmann

That generally means that there's a problem with the log_errors table (meaning there's an error but it ran into problems trying to log it in the database).

See https://www.simplemachines.org/community/index.php?msg=4120497 and following posts for further details on that. Once the problem with that table is fixed we should be able to get more info on what exactly is happening.
Michael Eshom
Christian Metal Fans

voom

I had a look at that thread, but I think it would be better, to not go forward with my issue over there, but here (for me there is no updating, I have a fresh installation of 2.1.2 and about 25 mods)

The db structure in the log_errors table look fine and complete

Quote from: Arantor on April 18, 2022, 02:36:21 PMCan you try changing Packages.php around line 920 so it reads:
Code Select Expand
SELECT `version`, `themes_installed`, `db_changes`instead of the code it has (just putting ` around the things in the SELECT statement)?
Trying this, I get a 500 error

I deactivated the setting as in the solution here https://www.simplemachines.org/community/index.php?msg=4121949 but have not been able to test if that helps.

At the moment I have 3 mods that are installed and running, but in the package manager they show as not installed, one of them being TinyPortal

Now one of my questions is, if I can set the packages to installed manually like somewhere in the database? Or can I just install a package again when the above problem is solved, and it would not change / break the things that are already installed but fix the status to "installed"? I suppose I would install an update to a mod by just installing it over the existing (so could maybe do that with the same version as well)?

I had a look at log_packages - the mods in question do not appear in that log at all.

geminiman

you could maybe use the fix packages tool here .
https://wiki.simplemachines.org/smf/Manually_setting_a_package_installed_or_uninstalled

if a package or packages you installed are causing some issue , and they seem to be installed yet showing as not installed then something is wrong . well if you could uninstall them via package manager the package manager may give you an error message advising not to uninstall .as it could cause problems .

with fix packages tool you will see a list of all installed mods , and also a seperate list of any uninstalled mods . if  a mod has a problem , well you could go to the installed packages list , tick the tick box of the mod in question and then select MARK  UNINSTALLED SELECTED . that means that the mod in question will then leave the installed mods list and go to the uninstalled mods list . at that point you could go back to your package manager and see if the mod in question can now be safely uninstalled and then deleted . then you can get a version of that mod that does work .

the fix packages tool goes in the root folder of your site . then you copy / paste the link to your site to your web browser followed by /fix_packages.php then the tool should pop up on your screen .

if that does not work or help . perhaps you should consider putting in a clean file set , as that will remove (uninstall ) any installed mods and themes . the mods should still be listed in package manager . but again see if you can then SAFELY uninstall and then delete any mod causing a problem .but always best practice before you make any changes is to ensure you have a backup copy of your database .

the above of course wont fix any problem that your database may have . the above is merely for removal of a mod that may be causing a problem .

but what i always say here is there are guys on here far more knowledgeable than me , so if they advise you different to me please take their advice .



voom

Interesting - this file instantly gives me a similar "Error Loop"... Can't run it...

array(4) {
    [0]=> array(3) { ["file"]=> string(70) "/var/www/vhosts/.../Sources/Subs.php" ["line"]=> int(5819) ["function"]=> string(9) "log_error" }
    [1]=> array(3) { ["file"]=> string(70) "/var/www/vhosts/.../Sources/Load.php" ["line"]=> int(481) ["function"]=> string(21) "call_integration_hook" }
    [2]=> array(3) { ["file"]=> string(61) "/var/www/vhosts/.../SSI.php" ["line"]=> int(139) ["function"]=> string(14) "reloadSettings" }
    [3]=> array(4) { ["file"]=> string(70) "/var/www/vhosts/.../fix_packages.php" ["line"]=> int(22) ["args"]=> array(1) { [0]=> string(61) "/var/www/vhosts/.../SSI.php" } ["function"]=> string(12) "require_once" }
}
Error loop.

voom

Quote from: geminiman on June 13, 2022, 11:25:27 AMwith fix packages tool you will see a list of all installed mods , and also a seperate list of any uninstalled mods . if  a mod has a problem , well you could go to the installed packages list , tick the tick box of the mod in question and then select MARK  UNINSTALLED SELECTED . that means that the mod in question will then leave the installed mods list and go to the uninstalled mods list . at that point you could go back to your package manager and see if the mod in question can now be safely uninstalled and then deleted . then you can get a version of that mod that does work .
I am a little confused here - the 3 mods show as not installed, which is why I can't uninstall them. So it would have to be the other way around: tick the box and select MARK INSTALLED SELECTED to have it go to the installed list. Which is where I could go to the package manager and see, if the mod can safely uninstalled and deleted.

On top of that, I seems like the problem are not the mods that show uninstalled, but a prior mod that is installed, that broke something. If it is the first of the 3 that broke it on install, I would only have to uninstall that. It would be the "TinyPortal", and the error may have shown with the next one "Join Reason" the first time. But TinyPortal is the first to show as not installed

The last one before that was quite some time ago, and after that I installed and uninstalled mods. That would be "SMF Post Prefix".

Should I try to uninstall "TinyPortal" manually? It does nothing to the core files, but there is a lot in the db


geminiman

Quote from: voom on June 13, 2022, 12:16:09 PM
Quote from: geminiman on June 13, 2022, 11:25:27 AMwith fix packages tool you will see a list of all installed mods , and also a seperate list of any uninstalled mods . if  a mod has a problem , well you could go to the installed packages list , tick the tick box of the mod in question and then select MARK  UNINSTALLED SELECTED . that means that the mod in question will then leave the installed mods list and go to the uninstalled mods list . at that point you could go back to your package manager and see if the mod in question can now be safely uninstalled and then deleted . then you can get a version of that mod that does work .
I am a little confused here - the 3 mods show as not installed, which is why I can't uninstall them. So it would have to be the other way around: tick the box and select MARK INSTALLED SELECTED to have it go to the installed list. Which is where I could go to the package manager and see, if the mod can safely uninstalled and deleted.

On top of that, I seems like the problem are not the mods that show uninstalled, but a prior mod that is installed, that broke something. If it is the first of the 3 that broke it on install, I would only have to uninstall that. It would be the "TinyPortal", and the error may have shown with the next one "Join Reason" the first time. But TinyPortal is the first to show as not installed

The last one before that was quite some time ago, and after that I installed and uninstalled mods. That would be "SMF Post Prefix".

Should I try to uninstall "TinyPortal" manually? It does nothing to the core files, but there is a lot in the db

what im saying is that even tho your smf site is saying mods are not installed THEY ARE indeed installed as you have said they are . so fix packages all being well should show you these mods as installed . by ticking them and marking them uninstalled that SHOULD allow you to either safely uninstall install them or delete them from package manager .

however if they are not in the installed list but in the uninstalled list you can tick them and mark them as installed .then go back to package manager and see if the mods are now showing as installed , if they are try and uninstall and remove them or which ever one you think is causing the problem .

but adding a clean file set will (should ) also uninstall the mods , in fact all mods and themes (the site will go back to default core theme. so that might also solve the problem . all be it you will have to re upload any third party theme that you were using . all mods will be in the package manager listed as uninstalled .then simply install any mod you know is safe . but fix packages may be the simple way to i hope fix your problem .but as always defer to any advice you are given here by the far more knowledgeable people on this site .

voom

Ok, now I get it... It's just: see above - the tool gives me the same kind of error! And in this case it means, I can't use it at all. So I would have to fix the issue in order to use the tool that could help fixing the issue...

Quote from: geminiman on June 13, 2022, 04:19:39 PMbut adding a clean file set will (should ) also uninstall the mods , in fact all mods and themes (the site will go back to default core theme. so that might also solve the problem . all be it you will have to re upload any third party theme that you were using . all mods will be in the package manager listed as uninstalled .then simply install any mod you know is safe
That is good to know. I always thought it to be more complicated to start over fresh (or update)... I don't use a third party theme, I installed "Curve2 Color Changer" and I wrote a bunch of CSS myself.

voom

Quote from: voom on June 13, 2022, 11:38:16 AMInteresting - this file instantly gives me a similar "Error Loop"... Can't run it...
To make that clear, with "this file" I meant the fix packages tool...

Steve

Let's try not to post within 2 minutes of the last time. You could have edited your post and added your second comment.
DO NOT pm me for support!

voom

Ok, though my feeling is/was, that the problem is not the files but the database, I tried the clean file set method. After that in the package manager the packages mostly showed as installed, except the 3 mentioned above. Probably as expected, which is why the fix packages tool exists. But the tool still throws the same error, nothing has changed in that respect.

Also, before that, I tried to uninstall the TinyPortal, but that is not so easy manually, as it is not a mod in the way that I could see what to find and replace / remove.

So I am back to square one. I restored the backup I made before trying the clean file thing.

This is kind of a recursive situation. "Error loop" describes it well ....

Any further ideas?

Quote from: Steve on June 13, 2022, 06:08:17 PMLet's try not to post within 2 minutes of the last time. You could have edited your post and added your second comment.
Sorry, will do... (I tend to think it is organized better if it is one post for one thought, but I will comply to what is preferred)

geminiman

" I tried the clean file set method. After that in the package manager the packages mostly showed as installed, except the 3 mentioned above"

strange putting a clean file set in usually uninstalls all your mods , just leaves them listed as uninstalled in package manager . did you delete the sources and themes folders ? as the new file set replaced them with new folders . as you said you are using the default core theme doing that should LOOK as tho nothing has changed theme wise .

sorry i did not notice there that you had got an error from fix packages tool . sorry about that . so obviously you cant use that . if you used a database backup that was made when the problem already existed the problem will still be there , i mean if database related . do you have a slightly older backup from a time before the problem occurred ? . putting a new clean file set for obvious reasons will neither affect or make changes to your database , but as i say it should IN MY EXPERIENCE uninstall all your mods and return your site to the core default theme . then IN THEORY ATLEAST if a mod that you installed caused the problem it should now be uninstalled and you can remove / delete it from package manager .

i thought it was a mod that you installed that caused the issue hence the instruction i gave you . if your experience tells you that its a database related issue then you need to speak with one of the top guys on this site such as doug or kindred or arantor , if they cant help you fix the problem id say no one could lol . they really are the best so im  sure they will get you sorted .

voom

I think, that the fact, that the fix packages tool throws the same kind of error, points in some direction, does it not?

You say the clean file set should leave the packages at uninstalled. What does removing them from package manager actually do? What I don't know/understand, is what discerns "uninstalled" and "installed". Obviously, "installed" means, that the mod-files and modifications to core files are present and there is or may be something changed / added in the database. So what does "uninstalled" mean? The modifications are probably supposed to be gone. The extra files may or may not be gone. Does that leave something in the database? Does "removing" remove extra files and database modifications?

As long as I don't know that, I find it hard to know which relicts may keep causing problems.

Quote from: geminiman on June 14, 2022, 02:05:05 PMi thought it was a mod that you installed that caused the issue hence the instruction i gave you . if your experience tells you that its a database related issue then you need to speak with one of the top guys on this site such as doug or kindred or arantor , if they cant help you fix the problem id say no one could lol . they really are the best so im  sure they will get you sorted .
I don't know what caused the error, but something must have changed something, otherwise there would be no problem. So the next guess is, that it is a mod. It would have to be TinyPortal, but that does not do much to any core files. It does however add quite a few tables in the database. That is as much as I have got. Plus everything I tried so far unsuccessfully.

I sure would not mind help from the top guys, but I am reluctant to @mention them, or should I? They seem to be quite present here, but surely get quite many requests for help.... 

Chen Zhen


I'll admit I haven't read this thread in its entirety but it seems as though you've likely installed/uninstalled a number of mods whilst ignoring errors or had some sort of crash during the process.

Have you tried using the repair settings tool to remove all hooks & then use the upgrade package method to restore SMF to its default state? This process does not truncate your members or messages/posts.

I attached a repair_settings file that has some additional options for clearing/truncating the SMF log tables which should nullify any corruption with those specific tables and also a general repair tables option (MyISAM only).

Use: Disable all hooks, Repair MyISAM Tables & Clear DB Logs

How to use repair_settings:
https://wiki.simplemachines.org/smf/Repair_settings.php

Upgrading instructions:
https://wiki.simplemachines.org/smf/Upgrading

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

voom

Quote from: Chen Zhen on June 14, 2022, 11:55:23 PMI'll admit I haven't read this thread in its entirety but it seems as though you've likely installed/uninstalled a number of mods whilst ignoring errors or had some sort of crash during the process.
I have installed mods where there were small errors shown, and before going forward with that installation I made the change in that specific file manually and then went on with the installation. I had no errors for a long while until I installed TinyPortal. It showed no errors, but was the first mod that showed up as "not installed" in the package manager. I did not notice that because everything worked fine at that point. The next mod (Join Reason) was the first one to show the error loop and install fine anyways, except also not showing as installed in the package manager.

Quote from: Chen Zhen on June 14, 2022, 11:55:23 PMHave you tried using the repair settings tool to remove all hooks & then use the upgrade package method to restore SMF to its default state? This process does not truncate your members or messages/posts.
Not yet, I will try that soon and will report how it went.


Kindred

deleting mods from the package manager does not uninstall them.
if you (literally) uninstall the package from the package manager (and there are no errors) then the mod is uninstalled.

The state is flagged in the log_packages table in the database.

Yes, many mods WILL leave behind files AND database tables. If those files/tables are not called by other code, then they won't have any effect on anything.

Hooks are the other way that mods are called -- and those are in the settings table of the database with the variable LIKE %integrate%.
the repair_settings.php tool should allow you to remove hooks.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: