Post by Strangeman » Fri May 20, 2016 10:05 pm

I thought I had it sussed a few weeks ago. Tried going through the process again today and got

error undefined in red underneath the progress bar, which showed no progress

New member

Posts

Joined
Tue May 29, 2012 4:39 am

Post by Qphoria » Tue May 24, 2016 3:37 am

does your htaccess try to force https while you are using http to access the installer?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Strangeman » Tue May 24, 2016 5:08 am

I'll have to check that one - although I got around the problem by uploading the site from my local setup to a remote server and performing the upgrade and then bringing it all back onto the local server.

PS - No I don't think it was the HTTPS thing - it still happened using the default htaccess file

New member

Posts

Joined
Tue May 29, 2012 4:39 am

Post by Qphoria » Tue May 24, 2016 10:07 pm

easiest way to check is to hit f12 on the page and have the javascript console open so you can see any errors.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Strangeman » Wed May 25, 2016 2:58 am

Thanks for that suggestion - upgrade completed successfully (obviously I must have done something else differently ...?)

New member

Posts

Joined
Tue May 29, 2012 4:39 am

Post by MarkW-UK3 » Wed May 25, 2016 6:51 pm

Hi
I am aiming to upgrade my existing 1.5.6.4 to 2.2.0.0 using your script.

A quick question as it doesn't seem to be absolutely clear in the OC install/upgrade texts - when upgrading do I copy just the contents of the Upload folder from the OC 2.2 download file or all of the files in the root of the zip too. There are github, md and composer files in the root of the download - do these need to go up too?

I know that I need to use the install folder from your script rather than the one that comes from the OC 2.2 download.

Just didn't want to upload anything that might make the wheels fall off

Thanks

Newbie

Posts

Joined
Wed May 25, 2016 6:45 pm

Post by brik » Wed May 25, 2016 8:52 pm

Hi.
(upgrading from 1.5.3 to 2.0.2)
I initially had a couple of problems, overcome by using this newer upgrade script and making sure I had copied all the files to the right location (I hadn't but I have now.

In any case the upgrader completed and reported success.
I looked into admin, at first sight fine but I got an error message saying my IP address was not allowed to use the API.
I went to system->users->user groups and clicked to edit 'Top Administrator', I clicked on 'select all' for both Access Permission and for Modify Permission.

After saving I noticed that the update hadn't saved for the entries on Modify from report/customer credit to the end of the list which includes both user/api, user/user and user/user_permission - in other words I don't have permission to change permission!

Help!

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by brik » Wed May 25, 2016 9:38 pm

Further to this permissions error.

By looking at the table I saw there wasn't an entry for modify for elements that I didn't have permission for, so after taking a copy of the table I added this to the end of the data "user\\/user_permission"

On viewing setting->user group-> edit user group I could see that I now had permission the change user permissions - however when I did change them and click on save none of the change were saved and that data I'd added was deleted form the table.

So, I've no idea how to proceed.

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by brik » Wed May 25, 2016 11:33 pm

Another error.
In logging on and entering the Dashboard screen in MS Edge and MS IE I got an undefined error and the icons and the World and the Sales Analytics widget didn't appear.

So, having done some reading I placed this below in my .htaccess file:
# Fix Icons
<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

After this the icons appear fine but the widgets still don't.

However, all this works fine in Firefox (it seems not to work in Chrome).

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by brik » Thu May 26, 2016 2:34 am

OK solved the issue with the widget.

I've created a clean copy on ver 2.2 which contained a good .htaccess file and that's worked fine.

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by Qphoria » Thu May 26, 2016 4:56 am

@brik.

So to explain the issue with each of your problems....

1. You saw the API not allowed error. Next to that error is the "Add IP" button so just click that. Or you can goto the Users->API menu and edit the api user to add your IP there. This is NOT the same thing as permissions.

2. But so you did (somehow?) manage to uncheck access to the user area. Yes this is a dangerous thing as it will indeed let you lock yourself out.. and adding it back isn't as easy as just running a sql command since the data is json encoded. For this, you need to basically disable the validation checks on the permissions by:
a. EDIT: system/library/user.php
b. FIND:

Code: Select all

public function hasPermission($key, $value) {
c. AFTER, ADD

Code: Select all

return true;
That will let you bypass the permission check so that you can properly check the allowed sections.

3. Undefined error with missing or "box" images. This is because of another error in 2.2.0.0 that instead of using the HTTP_SERVER value from the config, it uses the HTTP_HOST value. So if you have "www.example.com" in your config but type "example.com" in the url and hit go, it will not load icons and some scripts. In previous versions and in versions after the bug fix, this will correct itself on the next page load, but not with 2.2.0.0. The fix for that and another url issue with https addresses is across 3 files which I've attached. Be sure you upload those to the correct place AFTER you've uploaded all the original 2.2.0.0 files from the zip.

Attachments

Upload to system/config

Upload to system/config

Upload this to system/library


Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu May 26, 2016 4:59 am

MarkW-UK3 wrote:Hi
I am aiming to upgrade my existing 1.5.6.4 to 2.2.0.0 using your script.

A quick question as it doesn't seem to be absolutely clear in the OC install/upgrade texts - when upgrading do I copy just the contents of the Upload folder from the OC 2.2 download file or all of the files in the root of the zip too. There are github, md and composer files in the root of the download - do these need to go up too?

I know that I need to use the install folder from your script rather than the one that comes from the OC 2.2 download.

Just didn't want to upload anything that might make the wheels fall off

Thanks
Upload all files and folders from inside the "upload" folder to your server EXCEPT for the "install" folder. Overwrite the existing files on your server. You do not need any file outside of the upload folder.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by pm-netti » Thu May 26, 2016 4:52 pm

There in catalog.php is bug:

Code: Select all

// Action Events
$_['action_event'] = array(
	'view/*/before' => 'event/theme',
	//'model/*/before' => 'event/debug/before'
	//'model/*/after' => 'event/debug/after'
);
change to:

Code: Select all

// Action Events
$_['action_event'] = array(
	'view/*/before' => 'event/theme'
	//'model/*/before' => 'event/debug/before'
	//'model/*/after' => 'event/debug/after'
);

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by brik » Thu May 26, 2016 5:30 pm

@qphoria
1. You saw the API not allowed error. Next to that error is the "Add IP" button so just click that. Or you can goto the Users->API menu and edit the api user to add your IP there. This is NOT the same thing as permissions.

2. But so you did (somehow?) manage to uncheck access to the user area.
1. Yes, I clicked that button but it didn't work. Looking at the API info in my clean copy compared to my upgraded copy I can see the API key if different in length, the 'clean' one is around twice the length - I don't know if this is significant or not.

2. I don't know if I did inadvertedly but I don't think so. I think I simply went to that page and clicked select all and update then move to the next action.

Anyway, I'll apply the solutions you've provided and see where I am from there.

**edit

First the good news. Those files you provided worked fine, as I suppose you'd expect them to.

1. But regarding the API, I went to ad my IP to the list via the form rather than the button and got an error, I received a message saying I do not have permissions to modify APi's and this was displayed within the field itself "<b>Warning</b>: Illegal string offset 'ip' in <b>/home/rosar248/public_html/OC/admin/view/template/user/api_form.tpl</b> on line <b>86</b>" - I've checked again that I have the correct fiels from the 2.2 upload folder from the zip.

2. Regarding User group permissions. This is the section of code after I've amended it.
public function hasPermission($key, $value) {
return true; }
-- if (isset($this->permission[$key])) {
-- return in_array($value, $this->permission[$key]);
-- } else {
-- return false;
--
-- }
-- }

No matter what I change to modify on the form I get the 'you do not have permission to modify user groups' message. If I remove permissions from one I can add permissions to another, albeit with the message but if I refresh the page it reverts to what it was. So, there must be something else.


Cheers

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by brik » Sun May 29, 2016 1:25 am

Further on the user permissions. It's not a upgrade issue.

I created a clean copy of 2.2
Looking at the user group permissions I noticed that there were several items, 3 of them, with modify that had their check box unchecked. I also noticed that the entries for user/api, user/user and user/user_permission were correctly checked.

I selected all and updated and received a successful update message.

Subsequently in trying to add another user I received an error 'you do not have permissions to modify user'.

On checking user group permissions I saw that the three entries I mentioned above were now unchecked.

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by pm-netti » Sun May 29, 2016 2:45 am

brik wrote:Further on the user permissions. It's not a upgrade issue.

I created a clean copy of 2.2
Looking at the user group permissions I noticed that there were several items, 3 of them, with modify that had their check box unchecked. I also noticed that the entries for user/api, user/user and user/user_permission were correctly checked.

I selected all and updated and received a successful update message.

Subsequently in trying to add another user I received an error 'you do not have permissions to modify user'.

On checking user group permissions I saw that the three entries I mentioned above were now unchecked.
This is can be database issue. Can you go to phpmyadmin ( to your database) to table user_group. Open 'structure' and change column 'permssion' type to 'mediumtext'.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by brik » Sun May 29, 2016 6:03 pm

pm-netti wrote:
brik wrote:Further on the user permissions. It's not a upgrade issue.

I created a clean copy of 2.2
Looking at the user group permissions I noticed that there were several items, 3 of them, with modify that had their check box unchecked. I also noticed that the entries for user/api, user/user and user/user_permission were correctly checked.

I selected all and updated and received a successful update message.

Subsequently in trying to add another user I received an error 'you do not have permissions to modify user'.

On checking user group permissions I saw that the three entries I mentioned above were now unchecked.
This is can be database issue. Can you go to phpmyadmin ( to your database) to table user_group. Open 'structure' and change column 'permssion' type to 'mediumtext'.
I've done that however there is no difference.

and to confirm, I have the same error with a clean copy of 2.2.0.0 and with a another copy upgraded from 1.5.6.4

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by brik » Mon May 30, 2016 6:10 pm

Qphoria wrote:@brik.

So to explain the issue with each of your problems....

1. You saw the API not allowed error. Next to that error is the "Add IP" button so just click that. Or you can goto the Users->API menu and edit the api user to add your IP there. This is NOT the same thing as permissions.

2. But so you did (somehow?) manage to uncheck access to the user area. Yes this is a dangerous thing as it will indeed let you lock yourself out.. and adding it back isn't as easy as just running a sql command since the data is json encoded. For this, you need to basically disable the validation checks on the permissions by:
a. EDIT: system/library/user.php
b. FIND:

Code: Select all

public function hasPermission($key, $value) {
c. AFTER, ADD

Code: Select all

return true;
Question:
I have an upgraded system and a couple of systems installed from scratch. The new installations don't have the file system/library.user.php where did this file come from is it legacy? Is it even being used?

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm

Post by pm-netti » Mon May 30, 2016 11:20 pm

brik wrote: Question:
I have an upgraded system and a couple of systems installed from scratch. The new installations don't have the file system/library.user.php where did this file come from is it legacy? Is it even being used?
In version 2.2 this is in file system/library/cart/user.php

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by brik » Tue May 31, 2016 6:22 pm

pm-netti wrote:
brik wrote: Question:
I have an upgraded system and a couple of systems installed from scratch. The new installations don't have the file system/library.user.php where did this file come from is it legacy? Is it even being used?
In version 2.2 this is in file system/library/cart/user.php
Thanks

I've tested altering this file and it's clear that this is the operative file, the other one wasn't - so I made the change suggested abovew to this file then logged into admin, selected 'select all' within the admin group and clicked update. The system replied with a successful update message however when rechecking the data from within the system the original problem is still there, the bottom 33 entries from 'shipping/free to the end are now unchecked.

Newbie

Posts

Joined
Thu May 19, 2016 5:34 pm
Who is online

Users browsing this forum: No registered users and 8 guests