Upgrade fail on large forum RC1 to RC3

Started by chadon, December 18, 2020, 09:56:54 AM

Previous topic - Next topic

chadon

It ends in sql.gz but it has a size of 355MB as it is so I doubt my computer will have enough memory to open it once unziped.

For the password_salt field I have varchar(5)

shawnb61

Aha!  OK, so for the logon issue, you need to change the length of that field to 255.  You will then be able to logon.  (Note: A recent fix has gone in for this...)

Next to fix the attachment dirs...

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

To fix the attachment folders, I think the first thing to try is to actually re-enter them by hand, under Admin | Forum | Attachments & Avatars | Attachment Directories.

The order you add the attachment folders MUST BE the same order in which they were created/used.  So get a list of all 26 folders, newest to oldest, and enter them. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

Quote from: shawnb61 on December 19, 2020, 06:29:34 PM
Aha!  OK, so for the logon issue, you need to change the length of that field to 255.  You will then be able to logon.  (Note: A recent fix has gone in for this...)

Next to fix the attachment dirs...
Wow! You're the man Shawn, I managed to open the gate. Thank you very much.

Quote from: shawnb61 on December 19, 2020, 06:47:15 PM
To fix the attachment folders, I think the first thing to try is to actually re-enter them by hand, under Admin | Forum | Attachments & Avatars | Attachment Directories.

The order you add the attachment folders MUST BE the same order in which they were created/used.  So get a list of all 26 folders, newest to oldest, and enter them. 

What you sent me in PM didn't work but I'm starting to see the light.

I will see what I can do in the admin panel.

shawnb61

Sometimes the admin panel does funky things with the numbering...

Those numbers in the attachmentUploadDir entry must align with the numbers from the distinct query above...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

In the admin section it says that some folders don't exist but it also shows they contain thousands of files.

On the 2 last folders, the november and december ones it says Files Missing (Repair)

I clicked on repair and here are the results:

61916 fichiers/avatars ont une entrée mais n'existent plus sur le disque --- they have an entry but don't exist on the disk
95 fichiers n'ont plus de message auquel ils sont associés --  don't have associated messages
7559 fichiers joints sont dans le mauvais dossier --- are in the wrong directory
Les fichiers 13 n'ont pas d'entrée correspondante dans la base de données. (Ceux-ci seront supprimés) -- don't have a matching entry in the database, they will be removed

Should I process? I m worried about the  61916 files

chadon

Quote from: shawnb61 on December 19, 2020, 07:19:32 PM
Sometimes the admin panel does funky things with the numbering...

Those numbers in the attachmentUploadDir entry must align with the numbers from the distinct query above...
I checked the directories with ftp and they are matching what you guessed so I don't understand.

shawnb61

Do NOT run the attachment repair tool until folders are properly entered.  It DELETES all the entries it doesn't think make sense.....   Making it IMPOSSIBLE to fix...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

OK, I won't but I have found the problem. The months' directories are with one number they should all be with 2. It should be 2020/01 instead of 2020/1.

I'm changing them all and will let you know.

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

I can't do it from the admin panel, I guess I have to do it from MySQL?

Oops, there seems to be a problem.
Unable to move or rename. Please verify that the path is correct or that this directory does not contain any sub-directories.
Unable to move. A directory already exists at that path.
....

shawnb61

Just fix the string I sent.  Much easier...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

That's what I did and it's fixed. Now I have 5 directories out of the 8 last months with files missing error messages. I started the repair tool and here are the results:

309 attachments/avatars have an entry but no longer exist on disk
95 attachments no longer have a message associated with them
37573 attachments are in the wrong directory
22 files do not have a corresponding entry in the database. (These will be deleted)

shawnb61

What does it look like in the ACP when you browse Attachment Directories?  Do all 26 folders make sense?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

The 35k "wrong directory" ones likely still need to be fixed....
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

Quote from: shawnb61 on December 19, 2020, 08:15:59 PM
What does it look like in the ACP when you browse Attachment Directories?  Do all 26 folders make sense?
They all do except one base directory path showing:
/home/mustvco/public_html/fr/attachments2/2019/1

It should be showing:
/home/mustvco/public_html/fr/attachments2

But when I click on save, the first one keeps coming bath.

I tried to fix it in MySQL but I can't find anything about it.

shawnb61

The entries in the settings table are
  'attachment_basedirectories' - list of all basedirectories (I think you only have one)
  'basedirectory_for_attachments' - current basedirectory

Note the following query may help you tie things together, which attachments & folders belong to which entry:SELECT id_folder, min(id_attach) as minatt, max(id_attach) as maxatt FROM smf_attachments GROUP BY id_folder ORDER BY id_folder
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

Yes, maintaining base directories in 2.1 is quirky (same with 2.0...).  You cannot change anything.  You can delete (by blanking it out & saving) and you can add.  You cannot modify. 

Written up here, as an FYI:
https://github.com/SimpleMachines/SMF2.1/issues/5977
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

chadon

Quote from: shawnb61 on December 19, 2020, 08:56:14 PM
The entries in the settings table are
  'attachment_basedirectories' - list of all basedirectories (I think you only have one)
  'basedirectory_for_attachments' - current basedirectory

Note the following query may help you tie things together, which attachments & folders belong to which entry:SELECT id_folder, min(id_attach) as minatt, max(id_attach) as maxatt FROM smf_attachments GROUP BY id_folder ORDER BY id_folder
Thanks, that worked but the attachment numers increased since:

Here are the results:

309 attachments/avatars have an entry but no longer exist on disk
95 attachments no longer have a message associated with them
37118 attachments are in the wrong directory
22 files do not have a corresponding entry in the database. (These will be deleted)

shawnb61

Does the acp give you any hint which files are "in the wrong folders"?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: