e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 214 forks source link

Unable to install plugins or themes via admin web interface.... #1712

Closed rica-carv closed 7 years ago

rica-carv commented 8 years ago

I'm having a "Can't continue" error when i try to install plugins or themes via the web interface on the admin area.... Any ideas what might be causing it???

CaMer0n commented 8 years ago

What's the exact error message?

TurBoss commented 8 years ago

same here cant install themes or plugins via web no more info is shown

rica-carv commented 8 years ago

Plugin download area, in portuguese (go figures, dialog header is in english....):untitled 1

My theme download area gives a diferent info, it reverts back to the admin theme page inside the dialog..... untitled 2

Jimmi08 commented 8 years ago

Maybe this is related: I can't update from github on localhost : image

Plugins, Themes: image

rica-carv commented 8 years ago

@Jimmi08 Perhaps it is, but my images are from a live site, not localhost, so....

tgtje commented 8 years ago

Just checked too, syncing is fine, themes and plugins is Error : Unable to continue; this is what debugger mentions (no indication why it is happening as i can see (php 7.0.7) LIVE

Warning Declaration of e_tree_model::load($force = false) should be compatible with e_front_model::load($id = NULL, $force = false), Line 3445 of /home/domain/public_html/e107_handlers/model_class.php

Warning Declaration of e_front_tree_model::update($field, $value, $ids, $syncvalue = NULL, $sanitize = true, $session_messages = false) should be compatible with e_tree_model::update($from_post = true, $force = false, $session_messages = false), Line 3579 of /home/domain/public_html/e107_handlers/model_class.php

Warning Declaration of e_pref::update($pref_name, $value) should be compatible with e_front_model::update($from_post = true, $force = false, $session_messages = false), Line 28 of /home/domain/public_html/e107_handlers/pref_class.php

rica-carv commented 8 years ago

Sorry, but seems this bug is back again... Donne a github update 5 min ago, and still unable to install plugins online, it still gives the same error...

Moc commented 8 years ago

@rica-carv Please try the latest files and see if the issue still occurs.

rica-carv commented 8 years ago

@Moc Sorry for the delay. Latest e107 github files, now gives this "errors": untitled 1 untitled 2 untitled 3

All V2 plugins don't work, some v1.x work, others no....

CaMer0n commented 8 years ago

I just tested by downloading Links 2.2 and Userlanguage Flags Menu. They both worked for me.

tgtje commented 8 years ago

Just found out : please look inside the system folder ; folder (date/code),backup.. The files that are involved (no root folder, found some that do it) ) are downloaded as .zip (no name). Tested it on a php 7 and php 5 local system. In regards to prev post > cookie consent does work...PGL 0.2 does identical (no root folder) Reason garbled (non utf code) unknown...

rica-carv commented 8 years ago

@CaMer0n Indeed, download via admin UI both plugins from @Jimmi08 works. But it seems that after download, they're nowhere to be found on the installed or not installed page... They're put on the plugins folder, but not listed in any page on the admin ui plugin management area...

Anyway, have you tried to download Cookie Consent 1.0 or Personal Game Libray 0.2??

@tgtje Just checked my e107_system/backup, and there's only two files there: links_page.zip & userlanguage_flags_menu.zip. The two plugins @CaMer0n also sucessfully downloaded and installed. I've got nothing more there....

tgtje commented 8 years ago

pgl 02 gives me the .zip file, and a former e107wiki also..Just checked my live server : yes there too... Just an idea for the garbled text... as you may notice (looks to me that way) are both error pageviews identical.. Looking at ok (green) bar : 2 langs in use : maybe the error notice is not translated yet ???

rica-carv commented 8 years ago

@tgtje The two languages in the green bar might be that some lans are not translated yet, and are still in english in the other language (in this case, portuguese) files in english yet....

Further more, sometimes instead of the portuguese or english translation i get the LAN constant name itself, wich is kind of ankwards.....

tgtje commented 8 years ago

@rica-carv Nope not awkward... when syncing files are updated (new lan goes with them) but iff not present : the code is read and displayed... (assuming it happens in portuguese) if in english..... ? something old is somewhere active..(should not be); or a file worked on eg not in commit stage; LAN added in core file) with no EN support.. As always (at least very often) language (mis-) correctness can cause a lot of issues.

rica-carv commented 8 years ago

@tgtje For nonexisting translated LANs, it should default to base english language LAN definition. Not show the LAN name itself.... It would be better, and more user-friendly... Now if LAN's are by default not defined on the English language, then something is wrong, no?

Jimmi08 commented 8 years ago

@rica-carv you need to set if use English lang if strings are not defined. If not, you will see LAN strings.

CaMer0n commented 8 years ago

@rica-carv Does Language > Preferences > "Load language files only for current language" help?

rica-carv commented 8 years ago

@CaMer0n No, enabled or not i still get the same, the LAN constant name.... untitled 1 untitled 2

tgtje commented 8 years ago

Replication : visual ( it falls to the age/version of language pack in use)..... 001 002 003 004 005 006

As long as the (newer) LAN's do not have defined text, the code'change lang' remains inactive and will display the LAN instead of english (it does not loop back to english helas..) I do see tha LAN as a warning something has to be looked into... Only first image is shot of english; rest in Dutch. English itself has no issues... I know it is a little off topic, but it may not be forgotten. Edit (added)

For nonexisting translated LANs, it should default to base english language LAN definition. Not show the LAN name itself.... It would be better, and more user-friendly... Now if LAN's are by default not defined on the English language, then something is wrong, no?

My comment on this (quote) > Better : NO .. it would open up the use of incomplete or older packs (which carry unusefull stuff like html etc..) and thus could create security issues or errors. Solving such an issue will be much harder. In dutch we have a old saying : put the cart before the horse. System lang packs should be up to date,( using native lang in own plugins is up to the creator, for sharing those he/she should add it in english too).

Note : Cookie consent is used by more posters.. The strange thing IS one can, the other not... !! makes me wonder if a look into server settings are of influence..

MikeyGMT commented 8 years ago

I am getting "Unable to continue" also. I'm testing with Cookie Consent.

I have added some debug statements in e_marketplace.php in getRemoteFile. The remote file $path is http://[xxxx].org/r[xxxxx]t/?auth=&id=0&type=plugin&mode= I replaced sensitive data with xxxx.

CURL does not return an error code and the filesize is 0. It does not look like there is enough information in $path.

OK working backwards to plugin.php The array $_GET does not contain enough details. ( [mode] => download )

The action on the button is download, but there's nothing there to tell what to download.

MikeyGMT commented 8 years ago

Hmmm ... lots of code is commented out ... is this perhaps why it's not working?

        $string =  base64_decode($_GET['src']); 
        parse_str($string, $p);

    //  print_a($p);

    //  $mp = $pman->getMarketplace();
    //  $mp->generateAuthKey($e107SiteUsername, $e107SiteUserpass);

        // Server flush useless. It's ajax ready state 4, we can't flush (sadly) before that (at least not for all browsers) 
        echo "<pre>".EPL_ADLAN_94."\n"; flush(); // FIXME change the modal default label, default is Loading...
        // download and flush
    //  $mp->download($p['plugin_id'], $p['plugin_mode'], 'plugin');

        echo "</pre>"; flush();
    }
    /*$string =  base64_decode($_GET['src']);   
    parse_str($string,$p);
    $remotefile = $p['plugin_url'];

    $localfile = md5($remotefile.time()).".zip";
    $status = "Downloading...";
echo('Begin Downloading <br />');   
    $fl = e107::getFile();
    $fl->setAuthKey($e107SiteUsername,$e107SiteUserpass);
    $fl->download($remotefile,'plugin');*/
CaMer0n commented 8 years ago

@rica-carv @tgtje This is getting confusing. Let's stick to the topic in the heading. Please create a separate issue for the LANs displaying.

Now, back to the issue. Please re-test with DEBUG enabled - it will use a different unzipping method.

MikeyGMT commented 7 years ago

Do I recall correctly - should we not have to entering an e107.org username and password pref somewhere on our site? Come to think of it think my e107.org user was disabled some time back when I wasn't around often. Can't search the old forums etc.... is this related? Do core Devs still have access to e107.org and therefore can download, where as expired / new folk get Unable to Continue? Indeed adding this line before line 53 of e_marketplace confirms that there we stop after no password e107::getMessage()->addDebug("No User or Password Supplied");

public function generateAuthKey($username, $password)
    {
        if(trim($username) == '' || trim($password) == '')
        {
e107::getMessage()->addDebug("No User or Password Supplied");
            return false;   
        }
        $this->setAuthKey($this->makeAuthKey($username, $password, true));  
        return $this;
    }
MikeyGMT commented 7 years ago

Hi @CaMer0n I have added some debugging as via extra echo statements (debug wasn't playing #2013) My suspicion is that the there is not enough information to download Consent Plugin from e107.org. Maybe I have blocked myself from the site as I have done a couple of days of testing/debugging. Thanks Mike

Plugin Manager Download Debug.pdf

CaMer0n commented 7 years ago

@MikeyGMT Thanks. Authentication isn't required. If you were blocked then e107.org should not load for you at all? Please check the e107_system temp folder for any downloads. This error can occur when the unzip wasn't possible.

MikeyGMT commented 7 years ago

Hi All, I'm still debugging. For the sites when plugin download/install works, which adaptor is being used... is it fallback xmlrpc method?
My site selects the e_marketplace_adapter_wsdl - where it does not work. Thanks Mike

MikeyGMT commented 7 years ago

Hi All, I have got "Find Plugins > Download and Install from e107.org" working fully now on two of my websites. Quite a lot of fixes are needed so I need to take care I don't break anything. What I would like to know is, per my earlier post, does this function work at all for anyone? Thanks Mike

Moc commented 7 years ago

@MikeyGMT Not working for me on a live installation (latest git, PHP 5.6)

CaMer0n commented 7 years ago

@MikeyGMT I believe it's going to be different for everyone depending on the modules installed.

MikeyGMT commented 7 years ago

Testing image

MikeyGMT commented 7 years ago

Please can several folk download and test locally before this is accepted.

MikeyGMT commented 7 years ago

image

MikeyGMT commented 7 years ago

Checking Theme download. Not working. Did that work for anyone, for me I don't think it did?

CaMer0n commented 7 years ago

@MikeyGMT theme download is working here for me. (local machine) - without your changes. Let's discuss in real-time before losing more time on this.

CaMer0n commented 7 years ago

@rica-carv @tgtje @MikeyGMT @TurBoss Please update your files and let me know if anything improved with this issue. Thanks.

MikeyGMT commented 7 years ago

Hi @CaMer0n Thanks .. test result with latest git. image Thanks Mike

rica-carv commented 7 years ago

Using Firefox, when trying to download plugins, it simply displays the modal with the download circle animation, and keeps on with that. On & on & on.... Might still be bugged...

CaMer0n commented 7 years ago

@MikeyGMT I traced the problem on your machine to the suhosin 512 char limit on $_GET strings. See here: http://stackoverflow.com/questions/7724270/max-size-of-url-parameters-in-get

I have limited the amount of data sent via $_GET to avoid hitting this limit. Commit coming shortly. I assume the same will need to be applied to the theme download area.

CaMer0n commented 7 years ago

@rica-carv Was it behaving like this for you before the recent changes?

rica-carv commented 7 years ago

@CaMer0n No, before was giving me the error i reported before, up thread (all garbled output). I'll do another a test later today, ok? P.S.: I'm testing it on a localhost server, might it be the problem?

Moc commented 7 years ago

@CaMer0n Updated to latest Git. Plugin download working now (need to hit 'refesh' button to scan for changes in the plugin directories). Theme download is not working, opens up a modal with an iframe, I think, showing the admin area.

MikeyGMT commented 7 years ago

I found that the code is trying to install after download, but as the plugin directory was not scanned after the successful download, the folder is not found in the database, which is needed by the call to install.

Adding the following pluginCheck line after line 721 loads the new plugin into the db and then the plugin is installed well.

if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin'))
{
$this -> pluginCheck(true); // rescan the plugin directory
$text = e107::getPlugin()->install($data['plugin_folder']); 

image

CaMer0n commented 7 years ago

@MikeyGMT Thanks for that. Added it. @rica-carv Make sure e_DEBUG === false. (check your e107_config.php file, and also the e107-debugger plugin is inactive) , also clear your e107_system/--hash--/temp folder. Theme downloads should be working now also. ( @Moc )

rica-carv commented 7 years ago

@CaMer0n Latest github installed, as today. Caches clear & temp folders also. Plugins v2.x: OK... Plugins v1.x: Still garbled output, as reported above... Themes: OK...