Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1712 Plugin Download and Install from Market #2044

Closed
wants to merge 1 commit into from

Conversation

MikeyGMT
Copy link
Contributor

Fixes #1712 Plugin Download and Install from Market - Plus added debug statements around plugin download. Tested on 3 sites.

Fixes e107inc#1712 Plugin Download and Install from Market
parse_str($string, $data);

if(!empty($data['plugin_price']))
if(!empty($plugin_price))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use $data, is it empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup data was empty ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check details here...
https://docs.google.com/document/d/1hbq645DZHW2Zy1oSos71yJMiqHbEk06BObM5HvzWNgQ

I'm back after the weekend :)

'exception' => true,
"uri" => "http://server.soap.e107.inc.com/",
'cache_wsdl' => WSDL_CACHE_NONE,
'connection_timeout' => 60,
);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your tabs/spaces are showing as changes. Makes it difficult to track what you changed. :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - another learning experience.
After downloading OK, we were trying to install using the folder name, derived from the db.
Hence rescanning the folders was needed after download and before install.

@CaMer0n
Copy link
Member

CaMer0n commented Nov 18, 2016

@MikeyGMT Thank you. I'd prefer not to clutter the debug log if possible. Was the issue the lack of curly brackets on the else?

@@ -665,51 +680,59 @@ private function pluginDownload()
$frm = e107::getForm();
$mes = e107::getMessage();

e107::getDebug()->log("Plugin Download.");
$tmp = explode('&', e_QUERY); // #1712 we need to process new ampersand separated query
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we should check $_GET here. not 'split ampersands'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best way to learn is have a go.
What I found was $_GET only contained mode=download, there was no other data in there.
src is encrypted and in e_QUERY and that $tmp was already trying to grab values from exploding e_QUERY using .dot. separator.
However, we got & separators. So I added check to see id e_query contained &'s then exploded with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unsure about leaving debug calls - they only show up in debug mode... when we need them. Agree it adds clutter. Will trim them down.

Good learning experience. I suppose, why was $_GET and $data are empty may be a better fix ? I'm online today. Busy this evening and weekend.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce any of these issues on my local machine. If you can grant me FTP access to a machine that has this issue, I could run some tests. I have a hunch it is the use of '&amp' in the URL. I will commit that change and we can see how that affects things.

CaMer0n added a commit that referenced this pull request Nov 19, 2016
…g data added and ampersand modified on URL.
@MikeyGMT MikeyGMT closed this Nov 20, 2016
@CaMer0n
Copy link
Member

CaMer0n commented Nov 21, 2016

@MikeyGMT Do I understand that this issue is resolved?

@MikeyGMT MikeyGMT deleted the mikey20161117 branch November 26, 2016 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants