News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

2.1.6 - Database error in MySQL

Started by Volker S, July 01, 2025, 04:34:28 AM

Previous topic - Next topic

Volker S

All right, I'll report what fix_packages shows me and won't do anything for now if it's not the 6.24 that it shows me in the package manager.
I think I'll get to it next week.
Have a nice weekend...

shawnb61

If 6.26 & 6.25 were installed, they should be in the /Packages folder.

If not, they may display properly by copying them to the folder.
A question worth asking is born in experience & driven by necessity. - Fripp

Volker S

#22
They are not included in this restore. However, I suspect that 6.25 was installed.
I will probably have to look at the jump marks (hooks) of the individual patches from 6.24, 6.25, and 6.26 in the corresponding files to figure it out. But first, let's see what fix_packes says. I can still do that now.
Judging by the images, it appears that 6.26 is indeed installed.

Here is the result of fix_packages (see images):

Volker S

According to hook (if I understand correctly), I have AARR v2.26 installed.
The patch for 2.26 states the following in "install-smf21-214.xml":
Since I cannot insert code here, I will summarize it briefly. In the file "Subs-Attachments.php," the variable $fs should be appended.
And that's right: in my file "Subs-Attachement.php", this variable is appended at the end of line 1373 in the variable declaration of 'href'.

shawnb61

I'd just copy the 6.25 over to /Packages
A question worth asking is born in experience & driven by necessity. - Fripp

Volker S

According to the images I posted, 6.25 has been uninstalled and, based on my assumptions, AARR 2.26 has been installed. Here is the image with the attached variable from 2.26.

GL700Wing

Quote from: shawnb61 on July 05, 2025, 11:17:40 PMv6.24 of AARR is no longer downloadable
Attached ...

Quote from: Volker S on July 06, 2025, 02:42:22 AMI'm pretty sure that this information didn't change when I installed AARR version 6.26.
Even when I updated to 6.25, this version information didn't change.
By restoring the backup, I can't say for sure whether it's still 6.25 or already 6.26.
As per the following image the version number changes with each release.
You cannot view this attachment.

Quote from: Volker S on July 06, 2025, 09:35:53 AMJudging by the images, it appears that 6.26 is indeed installed.
AARR 6.26 is not shown on either image - the latest version shown is 6.25 (and it's not compatible with SMF 2.1.5 or later).
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Volker S

Please take a look at my screenshots. Fix_packages shows me that AARR 6.25 is uninstalled, and according to fix_packages, AARR is not installed at all. When I go to my package manager, version 6.24 is listed as deletable only—so it's not installed either.
And I believe that 6.26 is installed (because of the hook, which I may of course be misinterpreting).

But I have to go now—I'll continue next week.

GL700Wing

Quote from: Volker S on July 06, 2025, 10:21:47 AMPlease take a look at my screenshots. Fix_packages shows me that AARR 6.25 is uninstalled, and according to fix_packages, AARR is not installed at all. When I go to my package manager, version 6.24 is listed as deletable only—so it's not installed either.
Agreed.

QuoteAnd I believe that 6.26 is installed (because of the hook, which I may of course be misinterpreting).
This is what I disagree with (and I can't see an image showing hooks)  ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Volker S

I've now copied 6.25 and 6.26 into the package folder. Convinced?  ;D
But I really have to go now.

(I guess I misinterpreted the hooks. I thought that when the developers write their code into the original file via XML, that's a hook. But I haven't looked into it yet.)

shawnb61

Whichever one deinstalls clean at this point!
A question worth asking is born in experience & driven by necessity. - Fripp

GL700Wing

#31
Quote from: Volker S on July 06, 2025, 10:38:33 AMI've now copied 6.25 and 6.26 into the package folder. Convinced?  ;D
Sure - but I don't understand why you had removed them because doing so prevents you from uninstalling those versions. 

Also, if you are manually moving mod files in/out of the Packages directory/folder it makes it really difficult for those who are trying to help and support you understand and make sense of the issues you are reporting and the screenshots/reports you are sharing.

Also, when a later version of a mod has been installed the only options you will see for the earlier versions are to list the files and delete the mod.

Quote(I guess I misinterpreted the hooks. I thought that when the developers write their code into the original file via XML, that's a hook. But I haven't looked into it yet.)
Hooks are blocks of code in a custom script file that can be called from the default SMF script files by a mod without the need to actually modify the default files.  Although some mods can be implemented entirely using hooks this is not possible for the AARR mod - it uses a combination of hooks and code edits.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Volker S

I also don't understand why installed packages disappear on their own. It really wasn't me, or maybe I've been sleepwalking lately.
Something else:
I just got home, uninstalled AARR 6.26, and declined the question about deleting the package because I wanted to reinstall it later.
Then I installed SMF_2-1-5, followed by SMF_2-1-6 (and reinstalled the current database associated with SMF_2-1-6). Now I wanted to install AARR 6.26, but according to the package manager, it is already installed. This surprises me.

(SMF_2-1-5 is in the package manager three times again, but I am familiar with this error by now).

Thank you to everyone who has posted here.

GL700Wing

#33
Quote from: Volker S on July 06, 2025, 03:23:12 PMThen I installed SMF_2-1-5, followed by SMF_2-1-6 (and reinstalled the current database associated with SMF_2-1-6). Now I wanted to install AARR 6.26, but according to the package manager, it is already installed. This surprises me.
I think the process of restoring/reinstalling a database backup after you've already installed 2.1.6 is what's causing you to inadvertently end up with Package Manager issues - try using Fix_Packages to correct the status of the relevant/affected packages.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Volker S

I'll show you the status after uninstalling AARR 6.26, updating SMF 2-1-5, updating SMF 2-1-6, and restoring the latest database so that all posts are available in the forum again (see image SMF - Current status.jpg).
Since I hadn't reinstalled AARR (you suspect that it's due to the restored database), I wanted to uninstall AARR 6.26 and then reinstall it.
None of the files passed the uninstallation test (image: Uninstall attempt_AARR.jpg). However, I can work with AARR in the forum.
Should I set it to installed using packages-fix, even though it is installed via the package manager?

€dit:
The image of installed modules from fix_packages tells me that AARR 6.26 was installed on July 3, which was definitely before I updated the forum software and uninstalled AARR. I only did that yesterday evening.

GL700Wing

Fix_Packages can only show you the current database information for the Package Manager so this is what was in the database backup you restored (ie, that AARR was installed on 3 July) and when you restored the database you overwrote more recent information (ie, that AARR was installed yesterday).

QuoteHowever, I can work with AARR in the forum.
Should I set it to installed using packages-fix, even though it is installed via the package manager?
Yes.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Volker S

#36
Nothing happens because AARR is present on both sides of fix_packages. On the uninstalled and installed sides.
I tried anyway to check the AARR 6.26 module on the uninstalled side and then use "Marked install selected" to move it exclusively to the installed side. Unfortunately, this did not change anything.

Edit: I set the duplicate version that was also in the installed window to uninstalled. The problem remains—I cannot uninstall the AARR 6.26 package—all files fail the test.
As long as both versions (6.26) appear in both the installed and uninstalled windows, something is wrong.

Quote(ie, that AARR was installed yesterday).
I only uninstalled it yesterday (didn't install it) – that came with the database restoration. That's why it says that I installed it on July 3.

Volker S

#37
I took a look at my table. There (smf_log_packages), your module 6.26 appears four times but is only installed once (your module is the gray lines). Can you make sense of that?

The time for the installed version is also correct -> 1751566773 translates to Thursday, July 3rd 2025, 20:19:33 (GMT +2)

My mistake—the normal function attachment is installed—as also available here in the forum. So AARR is definitely not installed—only the old table shows that. Then everything is correct, and if fix_packages does not work, I will have to delete the line in the table? Sorry for the back and forth.
However, I am happy to wait for your advice.

shawnb61

#38
Quote from: Volker S on July 07, 2025, 06:44:08 AMI'll show you the status after uninstalling AARR 6.26, updating SMF 2-1-5, updating SMF 2-1-6, and restoring the latest database so that all posts are available in the forum again (see image SMF - Current status.jpg).
I think part of the problem is here - that restoring the database is restoring the log_packages table, and bringing the table contents out of sync with the installation state of the packages & the contents of the /Packages folder.  If you're going to do that, you will need to use fix_packages to fix it.

log_packages keeps the install state, and it's also a historical log...  That's why there are multiple entries in there, there's been a bunch of installs & deinstalls. 

I haven't looked at the code, but I suspect:
- The one with the highest installation timestamp (& id_install) for that exact filename (sometimes it detects dupes & renames them...) is the main one.
- I suspect that both fix_packages & the package manager will exclude entries from display depending on the install state & whether the file exists in the /Packages folder.  Because you can neither install nor deinstall them without the file...

So I think you can really confuse the tools if the physical files are out of sync with log_packages, or log_packages has conflicting info, e.g., if an older one is flagged as installed.  And we are seeing that here.

Quote from: Volker S on July 06, 2025, 03:23:12 PMI also don't understand why installed packages disappear on their own. It really wasn't me, or maybe I've been sleepwalking lately.
We have seen similar in the past when a host's security settings are high... Files disappear.  It might be worth asking your host if any files have been flagged for quarantine or removal via any security mechanism.  These sometimes show up in your apache log.


What I would do...  I'd go back to this, to keep all current posts:

Quote from: Volker S on July 07, 2025, 06:44:08 AMI'll show you the status after uninstalling AARR 6.26, updating SMF 2-1-5, updating SMF 2-1-6, and restoring the latest database so that all posts are available in the forum again (see image SMF - Current status.jpg).

HOWEVER...  I'd delete the AARR 6.26 package.  Also, to be safe, I'd delete all references to it in the log_packages table and /Packages folder.  So you don't see it anywhere: not in the package manager, not in fix_packages & not in the /Packages folder. 

So everything agrees it's uninstalled:  the actual source code, the /Packages folder, and the log.

When your DB is current, and everything looks clean, reinstall AARR 6.26.
A question worth asking is born in experience & driven by necessity. - Fripp

Volker S

The smf_2-1-5 is also listed (at least) twice. Once as installed and once as not installed. Once by Volker (id=1) and once by the system? (id=0).
Is it better to leave it unchanged?

Advertisement: