Cannot install mod with Database error: 'sha256_hash' in 'field list'

Started by Bobby, April 06, 2020, 12:00:37 PM

Previous topic - Next topic

Bobby

Hi, i don't know if anyone has reported this issue or not, so i made this topic to describe it:
When i want to install a mod by the package manager, everything seem be Ok (all steps test successfully!). But after i clicked "install now", the forum displayed an error message:
QuoteUnknown column 'sha256_hash' in 'field list'
File: C:\Program Files\Ampps\www\DWVN\Sources\Packages.php
Line: 1219
in Packages.php:
// Credits tag?
$credits_tag = (empty($credits_tag)) ? '' : $smcFunc['json_encode']($credits_tag);
$smcFunc['db_insert']('',
'{db_prefix}log_packages',
array(
'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string',
'id_member_installed' => 'int', 'member_installed' => 'string', 'time_installed' => 'int',
'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string',
'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string',
'sha256_hash' => 'string',
),
array(
$package_filename, $package_name, $package_id, $package_version,
$user_info['id'], $user_info['name'], time(),
$is_upgrade ? 2 : 1, $failed_step_insert, $themes_installed,
0, $db_changes, $credits_tag, $context['package_sha256_hash']
),
Line 1219 ===> array('id_install')
);

It happens with all mods so i must be install them manually (so hard you know :))
I'm using SMF2.1 with lastest commit on Github!
What should I do to fix this problem? Thanks for your reading!

lurkalot

Yep it does seem to be broken, we had someone mention this issue on our TinyPortal support site a couple of days ago, after he upgraded to latest GitHub version, I've no idea if the issue was reported on GitHub though. 

Edit: I believe he added the column to the database manually and everything was working ok.

Bobby

Thank you for informing me! Actually, i used a trick to add data: installed the mod with SMF 2.0.17 then copied and inserted data to 2.1. Between i'm looking forward to the dev team fixing this problem :)

vbgamer45

There is an upgrade sql statement required with the latest one since new columns were added to log_packages
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Bigguy

I went through the upgrade process when I installed the latest from GH and I still got that error. I was the one that posted on TP about this.

Bigguy

A bit more info...

March 31st I updated my forum SMFH to the latest on GH. I ran the installer to upgrade the database and all went well. I then began to install mods. I installed TP and got the above error (OP) Seeing as the error showed after installing the mod there was nothing I could do. All is running fine but in the package manager it says the mod is not installed. So there is no way to uninstall it if I need to. I then installed the arcade, same thing happened. Same error and now it will not uninstall. Both TP and the arcade mods used were the latest versions they have out that install with SMF 2.1

shawnb61

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

Bigguy

I see that was merged already. I guess I will update the forum again soon, lol. ;)

Bobby

Thank you everyone! The problem has been solved and marked topic solved! :)

woolly bugger

so? has this been fixed in the latest github download.

cause i just installed last_commit_0e892c6 and I'm having the same issue..

shawnb61

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

Bobby

Quote from: shawnb61 on April 10, 2020, 03:13:54 PM
Yes, it has been fixed.  See your other thread.

Hi everyone, i keep getting errors when install any mods:

QuoteType of error: General
2: hash_file(C:\Program Files\Ampps\www\layphat\Packages/Oneall_Social_Login-4.0.0-SMF-2.1): failed to open stream: Permission denied
myforum.com/index.php?action=admin;area=packages;sa=install2;package=Oneall_Social_Login-4.0.0-SMF-2.1;pid=0
C:/Program Files/Ampps/www/layphat/Sources/Packages.php (Line 897)
-------------------------------------------

Type of error: General
2: hash_file(C:\Program Files\Ampps\www\layphat\Packages/Oneall_Social_Login-4.0.0-SMF-2.1): failed to open stream: Permission denied
myforum.com/index.php?action=admin;area=packages;sa=install;package=Oneall_Social_Login-4.0.0-SMF-2.1
C:/Program Files/Ampps/www/layphat/Sources/Subs-Package.php (Line 3154)

I'm using Ampps on Windows 10, PHP 7.3, MySQL 8.0.18, Apache 2.4.41.
Can you please check this issue? Thank you!

Advertisement: