Jump to content

add product error.


Recommended Posts

Hello,

 

every time i try to add an product it gives me an error :

 

An error occurred while creating an object. product

 

 

this link_rewrite field is required at least in English (English)

 

how to prevent this , cant work on my webshop now ..

Link to comment
Share on other sites

I got the same problem when install prestashop 1.6.0.6 in godaddy host application with fresh blank DB

tried 1.6.0.5 but same issue.

 

 An error occurred while creating an object. product 1.6.0.6

 

any suggestion for this? Thanks

Link to comment
Share on other sites

well why the hell hosting services suggest me to use automatic installers? Well if I already started and to install it again it will need to redo all my work? :ss

 

don't know, best to follow the cms instructions which do not mention using 3rd party installers.  you could download, unzip the native version of prestashop and replace files that may not be working in the existing shop.

 

and given you can't add products, then I don't think you have that much work involved yet.

 

there is an old saying 'the lazy work twice'.

Link to comment
Share on other sites

don't know, best to follow the cms instructions which do not mention using 3rd party installers.  you could download, unzip the native version of prestashop and replace files that may not be working in the existing shop.

 

and given you can't add products, then I don't think you have that much work involved yet.

 

there is an old saying 'the lazy work twice'.

Heh.. I'll work thrice..

  • Like 1
Link to comment
Share on other sites

I checked this since our hosting company uses Softaculous auto-installer.  The version it installs is 1.6.0.6.  I was able to install a product without any problems.  However, I would like to know any details on what you filled out for the product so that I can try to duplicate how you added your product.  Please let us know!

  • Like 1
Link to comment
Share on other sites

I can confirm softaculous seems to be creating clean installs, I used it several times on test shops :)

 

Hi Nemo, I posted against using 3rd party installers simply because over time in this forum we continue to see native functions not work properly and the fix has been to upload using ftp (overlay files) or doing native install.

 

so my recommendations of not using 3rd party installations is based on what I have seen in the forums. 

 

happy day to you my friend

  • Like 1
Link to comment
Share on other sites

Thanks Nemo!  And El Patron - I appreciate the report, regardless.  We have many customers using PrestaShop, so it's always important for us to follow any leads that may bring up possible issues that can be of concern.  You always provide great info so I'm always willing to listen.    Keep up the great work!  

 

Thanks!

 

Arnel C.

InMotion Hosting Community Support Team

  • Like 2
Link to comment
Share on other sites

Hi Nemo, I posted against using 3rd party installers simply because over time in this forum we continue to see native functions not work properly and the fix has been to upload using ftp (overlay files) or doing native install.

 

so my recommendations of not using 3rd party installations is based on what I have seen in the forums. 

 

happy day to you my friend

 

Sure, of course :D that's my point too, I was  just saying I had luck with softaculous so far :) And mines were only test shops :)

Link to comment
Share on other sites

  • 1 month later...

I'm having the same issue. I used autoupgrade to update website and i had this error. then I used to upload the files using ftp but still having this issue. I have uploaded the following folders with their contents: 

admin, classes, controllers, tools.

 

Some how when you try to add the product and show you this error, after the pages is been refreshed, it doesn't keep feel the fields that you have wrote text in it

 

The only module that i'm using which is available on the product page is Customer loyalty and rewards Advanced. anyone who can help me? Prestashop version 1.6.0.7

 

 

here is the error that i've got when trying to add a product

 

Notice on line 3101 in file /public_html/classes/controller/AdminController.php

[8] Undefined variable: definition
 
Notice on line 3101 in file /public_html/classes/controller/AdminController.php
[8] Trying to get property of non-object
 
Warning on line 3103 in file /public_html/classes/controller/AdminController.php
[2] Invalid argument supplied for foreach()
 
Notice on line 3101 in file /public_html/classes/controller/AdminController.php
[8] Undefined variable: definition
 
Notice on line 3101 in file /public_html/classes/controller/AdminController.php
[8] Trying to get property of non-object
 
Warning on line 3103 in file /public_html/classes/controller/AdminController.php
[2] Invalid argument supplied for foreach()
Edited by giwrgos (see edit history)
Link to comment
Share on other sites

I found the solution, basically i had this error T_PAAMAYIM_NEKUDOTAYIM on admin controller and i Changed line 3101:

$fields = $class::$definition['fields'];

to

$fields = $class->$definition['fields']; 

 

Then this modification cause me the problem of this error link_rewrite, where later i want back and change the  $class->$definition to $class::$definition. Again i had the error T_PAAMAYIM_NEKUDOTAYIM but this is was because i had php version 5.2 on my server, then i changed it to 5.3 and it worked

Link to comment
Share on other sites

  • 2 weeks later...

I've installed PS 1.6.0.8  with Installatron via cPanel. The auto install process installed fine.
I had generated a database with a name I could understand what the database was used for and this database was selected it in the advance setting of Installatron.
I did chose to have Installatron install PS without any Content. (I’ll add my own content)

 

So I’m also experiencing the 3 errors when adding a product (not using copy n paste, just typing a product in.

  1. This link_rewrite field is required at least in English (English)
  2. Products must be in at least one category.
  3. This product must be in the default category.

cPanel is showing PHP version 5.4.30

Apache version 2.4.9                                                         

MySQL version 5.6.17

 

 

One great advantage of using Installatron is the Automatic Backup feature.

and One great Disadvantage of using Installatron may be these problems :(

 

So before we spent much more time I’ll reinstall manually, and see what happens….  Whish me luck ;)

Link to comment
Share on other sites

A quick update...

 

Re-Installed PS 1.6.0.8 with Installatron and this time with All Defaults - Default Database, Default Content, the only thing I changed was to have PS install in a directory /test-01

And I'm able to add products!  No Errors :D

 

Oh how upset is my client going to be spending all that time and now looks like they will have to start over.... :unsure:

Link to comment
Share on other sites

A quick update...

 

Re-Installed PS 1.6.0.8 with Installatron and this time with All Defaults - Default Database, Default Content, the only thing I changed was to have PS install in a directory /test-01

And I'm able to add products!  No Errors :D

 

Oh how upset is my client going to be spending all that time and now looks like they will have to start over.... :unsure:

just a guess but don't install in folder with special charaters, i.e. -  seems like I saw this issue before due to that..just a guess

 

when you say no errors, do you have ps errors set to true?  config/defines.inc.php

 

also make sure to not use any cache back office-->advanced parms-->performance  (scroll to bottom, i.e. no file/memchache/apc etc)

Link to comment
Share on other sites

Ps Errors - I meant none of the 3 errors, I've not enabled debug mode in defines.inc.php

Cache - default settings = none

 

I was able to successfully install to a directory /test-1 

I was able to use a predefined database, so I can tell what the database is used for  eg ####_pshop

I was able to Rename the (Automatically generated by Installatron) Admin Directory

 

The only thing remaining that I can think of,  is to try with the Installatron option to have no PrestaShop content installed - My guess this is where the issue is.

But I'm out of time for today...

 

Thanks :)

Link to comment
Share on other sites

If I install PS with Installatron and select the “Give me a clean PrestaShop install (I’ll ad my own content!)”  =  Inserting Products will cause problems!

 

Does anyone know how to reinstall PS (with the demo content) but without losing current work (Categories, pictures, payment, and postage)?

 

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Nemo1 thanks for the reply i get the this link_rewrite field is required at least in English (English) and cannot add any products to the site ....

my version is

PrestaShop™ 1.6.0.8 -  0.420s

 

what do you have in the link rewrite filed (friendly url)?  the more detail you provide the less questions we will have.

 

also, did you import these products or add manually?

Link to comment
Share on other sites

  • 4 weeks later...

geting the same issue here 

 

sometimes the error is  2 errors 

  1. Products must be in at least one category.
  2. This product must be in the default category.

Sometimes the 3 errors mentioned earlier after changing saving methods

 

and other times a white blank screen with no updates made 

 

we are trying to change the carrier and for that simple change and no others we get the 3 errors

 

have multilingual with about 5 languages.

 

One thing we have on these products that we do not have on other products without these issues is lots of product attributes. Not as many as we like either but always had problems with to many.

 

The problem seems to be back with updates to 1.6 and trying to edit products with more that a nominal number of attributes (now called combinations)  we have the equivalent of say 5 teeshirt sizes and about 18 designs.  Perhaps combinations are something to do with it.

 

The website was one click updated from 1.4 latest to 1.5 latest to 1.6.0.6

 

trouble shooting right now 

 

If i notice any other pertinent points i will mention that also shortly.

Link to comment
Share on other sites

so here is my update to this issue that worked for me. It just got worse and worse.


Turned on error reporting....


error on product price pag4e = white screen and error   /home/      /public_html/classes/cache/CacheMemcache.php on line 156


I disabled memcache to file system cache and cleared the cache  (top right corner of the Advanced parameters - performance poge in presta 1.6.0.9 


 


stopped all blank white screens and and i could update products and save correctly after that.


 


Hope this might assist someone


  • Like 2
Link to comment
Share on other sites

Not sure how i turned memcache back on after my update. But i guess old habits die hard. I recommend not using memcache beyond 1.6 prestashop if you have any issues. It seems to be a main cause of issues for any of the updated sites i manage.

  • Like 2
Link to comment
Share on other sites

No - the internal one click update. I just went through and updated a bunch of products for the client. Still got some errors (perhaps 1 in 15 products), but clicking through the pages and saving got me to a successful result after the 2nd or 3rd attempt. FYI. All products eventually saved ok though. 

 

We use a certified Prestashop host  .

Link to comment
Share on other sites

  • 2 weeks later...

Followup: I ended up uninstalling PS and then reinstalling as previously described. I still had the issue, which may have been related to using unsupported characters in the new product title (I used a dash "-") but I am not certain that that had any bearing. What really seemed to make a difference was when I cleared my cache in Google Chrome (though I cannot say why). After that, I was able to create new products and all seems to be working now.

 

I'm sorry that I cannot offer a more comprehensive solution but I am not a programmer. This is simply what seemed to work for me.

Link to comment
Share on other sites

  • 4 weeks later...

i'm having the same problem.. with customers, products.. with everything. Can't create accounts, sign in, or add to cart as well. :(

Nothing is working sice i've upload to the new server because in my local server the presta was working in perfect conditions. :(

Link to comment
Share on other sites

You can try rolling back then upgrading again - that resolved errors for me once. Make sure you have full backups. Also check your chache off and try that.

 

Also if you can turn on error reporting first before trying any of that.

 

It will probably give you some errors you can google to see what issues others have had. I would do that first. here is a good guide for that. http://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information/

 

The community here is pretty good at helping out.

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

Also some details on the upgrade from what version to what version might be of assistance posting here. You can try posting a new thread with more details on the issues eg blnk white page after upgrading from version 1.4.8 to 1.5 XX 

 

in the past i have found upgrading to the latest - best 1.4 or 1.5  then going to the next version again after that has a better success rate eg rather than going fom a buggy 1.4 to the latest 1.5. Go from your current 1.4 to the latest 1.4 then to 1.5 (or whatever) in two one click updates.

Link to comment
Share on other sites

Ok so it is fresh install?  I would enable the error reporting and then see what errors show when accessing the front office.


EL Patron and Nemo i figured it out i need to fill more detail i was filling less info an it would not accept  Kudos to bote of you ...

Yeah those guys are the best. Cheers

Link to comment
Share on other sites

How did you add google analytics? It's returning in the call

 

 

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 
  ga('create', 'UA-55163294-1', 'auto');
  ga('send', 'pageview');
 
</script>
Link to comment
Share on other sites

I have Installed version 1.6.0.9 Both via 3rd party(MOJO) and FTP transfer from the copy downloaded from Prestashop.

I have the same issue every time I try to add a product.

 

3 errors
 

  1. This link_rewrite field is required at least in English (English)
  2. Products must be in at least one category.
  3. This product must be in the default category.

     Clicking on the product tabs produces a blank screen. Any help to resolve this would be much appreciated.
Link to comment
Share on other sites

  • 4 weeks later...

Blank Page? Enable error reporting: config/defines.inc.php set PS_MODE_DEV to true :)

 

This is one helluva learning curve for me......

 

I have the same three errors when attempting to add a product (category and one language). Running the debug produces this:

 

Warning on line 170 in file /home/fantiques/shopcart/modules/gamification/gamification.php

[2] file_put_contents(/home/fantiques/shopcart/modules/gamification/views/css/advice-1.6.0.9_324.css)

[<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: Permission denied

 

How do I fix this?

Link to comment
Share on other sites

  • 4 weeks later...

Followup: I ended up uninstalling PS and then reinstalling as previously described. I still had the issue, which may have been related to using unsupported characters in the new product title (I used a dash "-") but I am not certain that that had any bearing. What really seemed to make a difference was when I cleared my cache in Google Chrome (though I cannot say why). After that, I was able to create new products and all seems to be working now.

 

I'm sorry that I cannot offer a more comprehensive solution but I am not a programmer. This is simply what seemed to work for me.

Wow! I've been fighting with this 3 errors problem all night long. When i cleared my cache from browser it works well now. Also check out your Prestashop loader on the left corner of product page. Give it to load before making any changes.. If nothing works, theres a module called Store Commander. That helped me to edit products and its much faster for mass edit.

Link to comment
Share on other sites

  • 4 weeks later...

You have some permissions issues on that module. In any case, as it's not needed, you might simply want to uninstall it. If not, change that folder's permission level to 755 at least, or 777 (though not recommended)

I having the same 3 errors massages and this did not help,  will keep trying

Link to comment
Share on other sites

For products, try waiting, and let the page load all tabs (check one by one). Then test if it works. I noticed  I get the category association one if I save a product before the associations tab is fully loaded

I have found this to work sometimes, This did take away two of the error messages.

Still have the:  This link_rewrite field is required at least in English (English)

and english is what it is set at....... :wacko::angry::wacko::unsure:

and on we go searching for another way,

I manually install products,

PrestaShop version: 1.6.0.9

Server software version: Apache

PHP version: 5.3.28

reinstall is not and idea.

Link to comment
Share on other sites

no it was working for a short time, then I could click on all the tabs and save , this did not help at all.

I even let tech support form hosting company take a crack at it. and it still the same,

tried complete delete and reinstall and tried it again before making any changes to layout and Still could not add product without the errors coming up..

Link to comment
Share on other sites

×
×
  • Create New...