Jump to content

Recommended Posts

Is there any particular native modules that I need to install because I don't think I installed any modules recently. I uninstalled some modules which are not used in the time being. I really have no idea what's the cause of this problem...   :wacko:

Link to comment
Share on other sites

Hi you will need to click the add new category button on the top right hand side corner

 

I did but it still the same whether using the top right corner or using the other one.

 

ALTER TABLE product_shop ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

ALTER TABLE product ADD `redirect_type` ENUM('', '404', '301', '302') NOT NULL DEFAULT '' AFTER `active` ;

 

run these two statements in sql

 

Mind if I ask the purpose of these sql statement & what's actually happening? I just afraid if suddenly because of that it cause another problem. Thank you so much

Edited by Ben90 (see edit history)
Link to comment
Share on other sites

The statements will create a new colum called redirect type in the respective tables....I have never seen this type of error in a fresh install of prestashop..Can you try installing a fresh 1.6.0.14 version prestashop??

 

It's not fresh install, mate. So the website has been running for quite a long time with 1.6.0.9 and suddenly I can't create new categories or edit them.

 

I'm afraid if I upgrade the version, it gonna create more problems like what happened before. Some months ago it's updated from 1.4 to 1.6 and a lot of work need to be done to fix the problem.

 

That creation of column gonna fix this kind of error?

Link to comment
Share on other sites

An error occurred while creating an object. category ()

Is this the only message you receive?  There is no more information that is included after category?  Have you tried adding categories since you performed the upgrade from 1.4?  Or is this the first time you are trying to do this since the upgrade?

Link to comment
Share on other sites

Is this the only message you receive?  There is no more information that is included after category?  Have you tried adding categories since you performed the upgrade from 1.4?  Or is this the first time you are trying to do this since the upgrade?

 

Hi, thanks for replying. Yes. that's the only error message. It's been working well after like 4 months after upgrade. I've added some categories as well.

 

I reckon i didn't install any modules this past month, only module upgrade. Suddenly I can't add or edit any categories  :unsure:

Link to comment
Share on other sites

Hi, thanks for replying. Yes. that's the only error message. It's been working well after like 4 months after upgrade. I've added some categories as well.

 

I reckon i didn't install any modules this past month, only module upgrade. Suddenly I can't add or edit any categories  :unsure:

Things never stop working without something having changed.  and i certainly cannot say what you did or did not do.  If you don't if you changed something in the past month, then how would anyone else.  Perhaps you should look at your modules folder and review the date/time of those folders and see if anything has changed

Link to comment
Share on other sites

Things never stop working without something having changed.  and i certainly cannot say what you did or did not do.  If you don't if you changed something in the past month, then how would anyone else.  Perhaps you should look at your modules folder and review the date/time of those folders and see if anything has changed

 

The module updates are more like weekly. So, when I check it right now, almost all of them updated last Friday...

Link to comment
Share on other sites

I just checked it the last time I can edit the categories. It was 23rd of March, last month.

 

When I search it on phpmyadmin, it has duplicate entries on 1 id_category. The one before & after renamed. Is it normal?

 

Please check this screen shot:

2eevc5h.jpg

Link to comment
Share on other sites

Please try this....Go to admin panel  ..... Advance parameter performance >> here you will see disable all third party modules and disable all overrides ...select Yes here and try again.It may work.

 

Also try put error reporting true on defines.inc.php in the config folder ....tell me if you get any errors..Thank you..

Link to comment
Share on other sites

  • 2 weeks later...

Things never stop working without something having changed.  and i certainly cannot say what you did or did not do.  If you don't if you changed something in the past month, then how would anyone else.  Perhaps you should look at your modules folder and review the date/time of those folders and see if anything has changed

 

 

Please try this....Go to admin panel  ..... Advance parameter performance >> here you will see disable all third party modules and disable all overrides ...select Yes here and try again.It may work.

 

Also try put error reporting true on defines.inc.php in the config folder ....tell me if you get any errors..Thank you..

 

Hi guys,

 

So I tried to enable dev mode, but couldn't see any error message on the homepage. And then I go to some pages with products, then finally I can see the error message in FO:

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 24 in /home/marblece/public_html/classes/Tools.php on line 1150

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 24 in /home/marblece/public_html/classes/Tools.php on line 1150

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 24 in /home/marblece/public_html/classes/Tools.php on line 1150

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 24 in /home/marblece/public_html/classes/Tools.php on line 1150

 
Anyway, I didn't disable all third party modules & overrides at the moment because I afraid when I re-enable them, more problems will appears. Let me check whether I can do the restore quickly if something happened & then I can disable all third party modules & overrides.
Link to comment
Share on other sites

I found the solution for that one on forge.prestashop by adding \ before -

            $str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]\-\pL]/u', '', $str);
        else
            $str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]\-]/','', $str); 

But unfortunately that one didn't fixed the problem. Maybe that one is another things.

 

When I enable dev mode & try to create a new category, this is what appears on BO on the top:

Unknown column 'position' in 'field list'

INSERT INTO `ps_category` (`nleft`, `nright`, `level_depth`, `active`, `id_parent`, `id_shop_default`, `is_root_category`, `position`, `date_add`, `date_upd`) VALUES ('0', '0', '2', '1', '1', '1', '0', '0', '2015-04-24 11:38:01', '2015-04-24 11:38:01') 

When I try to edit a category, this is what appears:

Unknown column 'position' in 'field list'

UPDATE `ps_category` SET `id_category` = '411',`nleft` = '555',`nright` = '562',`level_depth` = '2',`active` = '1',`id_parent` = '1',`id_shop_default` = '1',`is_root_category` = '0',`position` = '25',`date_add` = '2013-07-22 10:58:42',`date_upd` = '2015-04-24 11:33:45' WHERE `id_category` = 411

I still can't edit or create a new category  :mellow:

Link to comment
Share on other sites

I see that there is a weird column in your table the colum name is proslider..This is a non default prestashop column .This might be the cause of the issue...you might need to drop the column called proslider.

 

I just realised something, mate. There is no column named "position" in ps_category. I check it on my localhost with original prestashop 1.6, there should be a column named "position" on number 10 inside "ps_category" table

Link to comment
Share on other sites

I recommend you to make all the changes on the table such that it should match a new prestashop install ..remove the unwanted and add the wanted colums.This should solve the issue.And take backup before making the changes incase you are not sure..let us know if the issue is resolved.

Edited by JoelWebsites (see edit history)
  • Like 1
Link to comment
Share on other sites

I recommend you to make all the changes on the table such that it should match a new prestashop install ..remove the unwanted and add the wanted colums.This should solve the issue.And take backup before making the changes incase you are not sure..let us know if the issue is resolved.

 

So this one solved the problem by adding position column which was missing:

ALTER TABLE `ps_category` ADD `position` int(10) unsigned NOT NULL default '0' AFTER `date_upd`;
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...