Jump to content
thirty bees forum

Prestools - the free mass edit toolset


musicmaster

Recommended Posts

3 hours ago, tomek said:

I copied shop data from TB 1.01 to another shop (kind of customers backup), created a new shop (TB 1.4, PHP 7.4) on my main domain and copied the data back to a new shop and all my customers cannot log in to my new shop. When they try to change their passwords, they got an error message 

Authentication failed.

Even when I change their passwords in BackOffice, they got the same error and cannot log in. 

Any idea what I might have done wrong?  😞

Most likely caused by password column size -- it should be 60 chars long. You can use core updater database schema verification to find all database differences, and fix them.

Link to comment
Share on other sites

I don't know, but I verified the database with updater and it did not find anything. I updated the store to bleeding edge, updated all the modules. Then run the database check again and it found something about "word search" or something.
Unfortunately I cannot reproduce the error now as I deleted the account that I had a problem and created a new one but I am stuck at the following:

 

Edited by tomek
Link to comment
Share on other sites

30 minutes ago, tomek said:

I don't know, but I verified the database with updater and it did not fing anything. I updated the store to bleeding edge, updated all the modules. Then run the database check again and it found something about "word search" or something.
Unfortunately I cannot reproduce the error now as I deleted the account that I had a problem and created a new one but I am stuck at the following:

 

When you have error 500 you should enable debug mode:

https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/

Link to comment
Share on other sites

4 minutes ago, tomek said:

I have done it and the 500 Error seems to be a Bees Blog module problem. I don't know whether both problems (client's authentication error and 500 error) are related, but I made a backup and will try to reproduce the error. 

Please share the error message that you get. It may enable people on the forum to analyze your problem. You may change irrelevant parts of it that might identify the server.

Link to comment
Share on other sites

I get the following:

Error

Class "BeesBlogModule\BeesBlogPost" not found
in file (beeeep)/public_html/modules/beesblogrecentposts/beesblogrecentposts.php at line 123
 
Source file: (beeeep)/public_html/modules/beesblogrecentposts/beesblogrecentposts.php :
104:        return $this->hookDisplayLeftColumn();
105:    }
106:
107:    /**
108:     * Display in home page
109:     *
110:     * @return string
111:     *
112:     * @throws PrestaShopException
113:     * @throws SmartyException
114:     * @since 1.0.3
115:     */
116:    public function hookDisplayHome()
117:    {
118:        if (!Module::isEnabled('beesblog')) {
119:            return '';
120:        }
121:
122:        $this->context->smarty->assign([
123:            'beesblogRecentPostsPosts' => BeesBlogPost::getPosts($this->context->language->id, 0, 4),
124:            'beesblogRecentPostsBlogUrl' => BeesBlog::getBeesBlogLink(),
125:        ]);
126:
127:        return $this->display(__FILE__, 'views/templates/hooks/home.tpl');
128:    }
129:
130:    /**
131:     * Display in product page
132:     *
133:     * @return string

 

Stack trace:

1. classes/Hook.php:744 source BeesBlogRecentPosts->hookDisplayHome(arguments)
2. classes/Hook.php:458 source HookCore::coreCallHook(arguments)
3. classes/Hook.php:282 source HookCore::execWithoutCache(arguments)
4. controllers/front/IndexController.php:54 source HookCore::exec(arguments)
5. classes/controller/Controller.php:202 source IndexControllerCore->initContent()
6. classes/controller/FrontController.php:243 source ControllerCore->run()
7. classes/Dispatcher.php:851 source FrontControllerCore->run()
8. ./index.php:33 source DispatcherCore->dispatch()

 

 

And there is a message about:

PHP version: unknown.  Code revision: unknown build for PHP unknown

The PHP ver. is 8.1

 

I also forgot to mention that when a client succeded to create a new account and tried to place an order, he got a message that the items he ordered are out of stock, while there was over 15 items in stock left.

Edited by tomek
Link to comment
Share on other sites

49 minutes ago, tomek said:

Can I change the following parameter:

$numtables = 9999;

to a bigger one? I am not sure what is the number of tables and if it makes any sense to increase the number.. 

Yes, you can. But it is ridiculous. A typical shop has 200 tables. 

BTW: yesterday there was an update of Copy_shopdata

  • Like 1
Link to comment
Share on other sites

Ok, I set up a new shop. After every change I logged on an old account to check whether everything is ok. When I copied all the clients with copy_shopdata (the latest one) I still have the same problem with

Authentication failed.

Changing password for any account gives nothing - still the same problem and none of the older shop clients can log in into my shop. 

I checked consistency of the tables with core updater and it said everything is ok.

 

Link to comment
Share on other sites

33 minutes ago, tomek said:

Ok, I set up a new shop. After every change I logged on an old account to check whether everything is ok. When I copied all the clients with copy_shopdata (the latest one) I still have the same problem with

Authentication failed.

Changing password for any account gives nothing - still the same problem and none of the older shop clients can log in into my shop. 

I checked consistency of the tables with core updater and it said everything is ok.

 

You should first look into source database ps_customer table and compare data with target db.

SELECT id_customer, passwd FROM ps_customer ORDER BY id_customer LIMIT 10

Verify few customers. If the data are different, you can keep this conversation here, as it's a bug in the copy tool.

If the data are the same, though, then the issue is somewhere else. You either didn't copied the _COOKIE_KEY_ and_COOKIE_IV_ settings from source to target server. Or maybe you used some sort of custom login functionality in your original server in the first place (maybe some auth module, or whatnot)

Link to comment
Share on other sites

1 hour ago, datakick said:

You either didn't copied the _COOKIE_KEY_ and_COOKIE_IV_ settings from source to target server. 

What do you mean by that? I have to admit I did not do such thing as I couldn't see anything like that in the copy_shopdata_config.php file :classic_blink:

Link to comment
Share on other sites

11 minutes ago, tomek said:

What do you mean by that? I have to admit I did not do such thing as I couldn't see anything like that in the copy_shopdata_config.php file :classic_blink:

/config/settings.inc.php

define('_COOKIE_KEY_', '********');
define('_COOKIE_IV_', '********');

Make sure your new server has the same values as the old server. This information was used to salt md5 passwords.

Link to comment
Share on other sites

17 hours ago, datakick said:

/config/settings.inc.php

define('_COOKIE_KEY_', '********');
define('_COOKIE_IV_', '********');

Make sure your new server has the same values as the old server. This information was used to salt md5 passwords.

datakick, when I copy those to a new shop I cannot even login to it - it says something like that:

The user does not exists or password is invalid

 

Edited by tomek
Link to comment
Share on other sites

40 minutes ago, tomek said:

datakick, when I copy those to a new shop I cannot even login to it - it says something like that:

The user does not exists or password is invalid

 

The employee and the customer tables use the same encryption. So either you import them both from the old shop and use its Cookie and Rijndael keys or you create them both in the new shop.

Link to comment
Share on other sites

Sorry, I am a bit lost ;)
When I create a new shop, the COOKIE_KEY and COOKIE_IV are different from the old one. When I change it to the old COOKIE_*, then I cannot login.

I cannot change the COOKIE_* things before running the shop installation (but after copying the TB data to my ftp). Doing it afetr installation results in failure of login into a new shop.

Edited by tomek
Link to comment
Share on other sites

5 hours ago, tomek said:

Sorry, I am a bit lost 😉
When I create a new shop, the COOKIE_KEY and COOKIE_IV are different from the old one. When I change it to the old COOKIE_*, then I cannot login.

I cannot change the COOKIE_* things before running the shop installation (but after copying the TB data to my ftp). Doing it afetr installation results in failure of login into a new shop.

Fine. Keep your new keys. But then don't import customer tables from other shops.

Link to comment
Share on other sites

  • 4 weeks later...

Solved. I had a strange .htaccess file in my prestool-directory.

I have problems to get prestools running on TB 1.4 after an upgrade. I tried to install prestools again. But only will get

403

Forbidden

You don't have permission to access this resource.

The permissions for the prestools directory are 755 and the files have 644

Any ideas

 

Edited by jn1
solved
  • Like 1
Link to comment
Share on other sites

2 hours ago, jn1 said:

Solved. I had a strange .htaccess file in my prestool-directory.

I have problems to get prestools running on TB 1.4 after an upgrade. I tried to install prestools again. But only will get

403

Forbidden

You don't have permission to access this resource.

The permissions for the prestools directory are 755 and the files have 644

Any ideas

 

Glad you solved it.

.htaccess can indeed cause strange problems.

Link to comment
Share on other sites

  • 2 months later...

Hi @musicmaster,

We started using Prestools to edit orders. For one order, I needed to edit the shipping costs. That worked fine. 

However, the associated taxes weren't updated accordingly:

image.thumb.png.6fe541aa3b0e044b1130c222af4a4b8d.png

You'll see that the total tax and the shipping tax are wrong.

Shipping 23,36 € x 19 % = 4,44 €

Total 98,36 € x 19 % = 18,69 €

Is this a limitation of the module or a bug or a user mistake?

Thank you.

Link to comment
Share on other sites

2 hours ago, 30knees said:

Hi @musicmaster,

We started using Prestools to edit orders. For one order, I needed to edit the shipping costs. That worked fine. 

However, the associated taxes weren't updated accordingly:

image.thumb.png.6fe541aa3b0e044b1130c222af4a4b8d.png

You'll see that the total tax and the shipping tax are wrong.

Shipping 23,36 € x 19 % = 4,44 €

Total 98,36 € x 19 % = 18,69 €

Is this a limitation of the module or a bug or a user mistake?

Thank you.

Which program are you using? I don't recognize the page. This is not order-edit.php.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...