Skip to main content
Can't Install Addons In 1.1B3 Started by scripple · · Read 32803 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Can't Install Addons In 1.1B3

I get database errors attempting to install any addons in 1.1B3.  php 5.6.  Here is the output from attempting to install a simple mod that adds code to display a "NEW" icon into Display.template.php

    Type of error: General
    Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given
    index.php?action=admin;area=packages;sa=install2;package=newposts.tgz
    File: /sources/database/Db-mysql.class.php
    Line: 1165

    Type of error: General
    Warning: max(): When only one parameter is given, it must be an array
    index.php?action=admin;area=packages;sa=install2;package=newposts.tgz
    File: /sources/database/Db-mysql.class.php
    Line: 297

    Type of error: General
    Warning: array_map(): Argument #2 should be an array
    index.php?action=admin;area=packages;sa=install2;package=newposts.tgz
    File: /sources/database/Db-mysql.class.php
    Line: 294

Re: Can't Install Addons In 1.1B3

Reply #1

Does the package do any change to the db? (Even only inserting a setting or a user option?)

It looks like an insert with an empty value.
Try changing in Db-mysql.class.php the line:
Code: [Select]
if (!empty($modSettings['using_utf8mb4']))
into:
Code: [Select]
if (!empty($modSettings['using_utf8mb4']) || empty($string))
Bugs creator.
Features destroyer.
Template killer.

Re: Can't Install Addons In 1.1B3

Reply #2

This package does not touch the database (at least not explicitly).  It has one source edit and nothing else.  And every package I have tried to install has failed with the same set of errors.  It's not unique to this package.

Re: Can't Install Addons In 1.1B3

Reply #3

Still failure that ends in showing a white page that says.

Connection Problems
Sorry, we were unable to connect to the database. This may be caused by the server being busy. Please try again later.

The Line 294 and 297 errors are now gone but the Line 1165 error remains

Re: Can't Install Addons In 1.1B3

Reply #4

Okay, wrong assumption. :P

In Packages.controller.php (admin directory), change:
Code: [Select]
$package_installed['db_changes'] = array();
to:
Code: [Select]
$package_installed['db_changes'] = '';
Bugs creator.
Features destroyer.
Template killer.

Re: Can't Install Addons In 1.1B3

Reply #5

Undoing your first suggested change and making your second fixes the problems.

Re: Can't Install Addons In 1.1B3

Reply #6

I'll take a note on this until my private server power supply is fixed.

Re: Can't Install Addons In 1.1B3

Reply #7

Quote from: emanuele – Okay, wrong assumption. :P

In Packages.controller.php (admin directory), change:
Code: [Select]
$package_installed['db_changes'] = array();
to:
Code: [Select]
$package_installed['db_changes'] = '';

Hi,   

I made the changes,  install  addons established, but does not work

errors encountered during installation;

RecentTopics

Code: [Select]
Warning: file_get_contents(xxxxx/public_html/packages/temp/RecentTopics.class.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/RecentTopics.class.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Bookmarks

Code: [Select]
Warning: file_get_contents(xxxxx/public_html/packages/temp/sources/Bookmarks.controller.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/sources/Bookmarks.controller.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/sources/Bookmarks.subs.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/sources/Bookmarks.subs.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/sources/Bookmarks.integration.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/sources/Bookmarks.integration.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/theme/Bookmarks.template.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/theme/Bookmarks.template.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/theme/Bookmarks.english.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/theme/Bookmarks.english.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201



SolveTopic



Code: [Select]
Warning: file_get_contents(xxxxx/public_html/packages/temp/admin/ManageSolveTopic.controller.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/admin/ManageSolveTopic.controller.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/subs/SolveTopic.subs.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/subs/SolveTopic.subs.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/templates/SolveTopic.template.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/templates/SolveTopic.template.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/SolveTopicIntegration.php) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/SolveTopicIntegration.php) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201

Warning: file_get_contents(xxxxx/public_html/packages/temp/solved.png) [function.file-get-contents]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 2127

Warning: copy(xxxxx/public_html/packages/temp/solved.png) [function.copy]: failed to open stream: No such file or directory in xxxxx/public_html/sources/subs/Package.subs.php on line 1201



sorry for my bad english

Re: Can't Install Addons In 1.1B3

Reply #8

Quote from: emanuele – In Packages.controller.php (admin directory), change:
Code: [Select]
$package_installed['db_changes'] = array();
to:
Code: [Select]
$package_installed['db_changes'] = '';
This did the trick for me yesterday. So far there is no other error except one that may relate to my web server (php) settings reported here: http://www.elkarte.net/community/index.php?topic=4083.0.


Re: Can't Install Addons In 1.1B3

Reply #10


Hi,

I tried

Bookmarks  the same problems

SolveTopic  the same problems

RecentTopics   not install   blank white page (?action=admin;area=packages;sa=install2;package=RecentTopics-master.zip;pid=0)

sorry for my bad english

Re: Can't Install Addons In 1.1B3

Reply #11

@Spuds and maybe @live627 apparently the issue here is that our beloved pacman lost the ability to understand packages of a directory (the github repo downloads).

I pushed this https://github.com/elkarte/Elkarte/pull/2739/commits/37a8959d7023e83b7dc33d960fdb1f3305595d7f but honestly seems more like a workaround rather than a proper fix. If you have a better idea feel free! O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: Can't Install Addons In 1.1B3

Reply #12

Interesting, I know that used to work, at least with master packages.    I'm woefully behind in doing package tests for 1.1,  should be able to get back to it in a couple of weeks!

Re: Can't Install Addons In 1.1B3

Reply #13

Hi,

development version  unzip it and upload overwriting everything the problem continues

Bookmarks  the same problems (Installed but not working, php error is seen when it is installed)

SolveTopic  the same problems  (Installed but not working, php error is seen when it is installed)

RecentTopics   not install   blank white page (?action=admin;area=packages;sa=install2;package=RecentTopics-master.zip;pid=0)
sorry for my bad english

Re: Can't Install Addons In 1.1B3

Reply #14

That's the issue with github "double-folded" packages and Elk having some trouble (again) finding package-info.xml, I think I mentioned it somewhere but can't remember where exactly.
Anyway: https://github.com/elkarte/Elkarte/pull/2739/commits/7b2fa9411f5ecbba291d7461f7f87ca8933aec25
should find them a bit more reliably (I forgot to add the method documentation... I hope Spuds doesn't notice. :P).
Bugs creator.
Features destroyer.
Template killer.