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

Exception displayed when inconv extension isn't enabled #10152

Closed
thunt4jr opened this issue Aug 27, 2018 · 15 comments
Closed

Exception displayed when inconv extension isn't enabled #10152

thunt4jr opened this issue Aug 27, 2018 · 15 comments
Labels
1.7.4.2 Affects versions BO Category: Back Office Bug Type: Bug Fixed Resolution: issue closed because fixed Old Products Page Concerns the old product page
Milestone

Comments

@thunt4jr
Copy link

Reminder

DO NOT create security issues here, but contact security@prestashop.com instead!

Describe the bug
A clear and concise description of what the bug is.

We are unable to save or make changes to the products. An error message would appear saying Unable to save. We are using the classic theme, and everything is pretty much standard.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'

  2. Click on '....'

  3. Scroll down to '....'

  4. See error

  5. Create or open an existing product

  6. Fill out everything

  7. Click on Save

  8. The error message comes up

Screenshots
If applicable, add screenshots or screen records to help explain your problem.

Additionnal information
PrestaShop version: 1.7.4.2
PHP version: 7.1.21
Memory limit: 1024M
Max excution time: 300
Upload Max File Size 1024M

MySQL version 5.6.33

@khouloudbelguith
Copy link
Contributor

Hi @thunt4jr,
Could you please provide us with more info? We need more details to understand how we can reproduce your issue:

  • debug mode report
  • PHP error logs
  • apache error log
  • javascript console log
  • screenshots

Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/

Thanks!

Best regards, Khouloud

@khouloudbelguith khouloudbelguith added Bug Type: Bug BO Category: Back Office NMI Status: issue needs more information Old Products Page Concerns the old product page 1.7.4.2 Affects versions labels Aug 27, 2018
@thunt4jr
Copy link
Author

Symfony\Component\Debug\Exception\UndefinedFunctionException:
Attempted to call function "iconv_strlen" from namespace "PrestaShopBundle\Form\Validator\Constraints".

at src/PrestaShopBundle/Form/Validator/Constraints/TinyMceMaxLengthValidator.php:43
at PrestaShopBundle\Form\Validator\Constraints\TinyMceMaxLengthValidator->validate('', object(TinyMceMaxLength))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:829)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateInGroup('', null, object(GenericMetadata), 'Default', object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:675)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateGenericNode('', object(Form), null, object(GenericMetadata), 'children[step1].children[description_short].children[1].data', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:118)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validate('', array(object(TinyMceMaxLength)), array('Default'))
(vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php:85)
at Symfony\Component\Form\Extension\Validator\Constraints\FormValidator->validate(object(Form), object(TinyMceMaxLength))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:829)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateInGroup(object(Form), '0000000017b1617700000000730ca197', object(ClassMetadata), 'Default', object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:542)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(Form), '0000000017b1617700000000730ca197', object(ClassMetadata), 'children[step1].children[description_short].children[1]', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(Form), 'children[step1].children[description_short].children[1]', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:408)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateEachObjectIn(object(OrderedHashMap), 'children[step1].children[description_short].children', array('Default'), object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:611)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(OrderedHashMap), '0000000017b1617600000000730ca197', object(ClassMetadata), 'children[step1].children[description_short].children', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(OrderedHashMap), 'children[step1].children[description_short].children', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:724)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateGenericNode(object(OrderedHashMap), object(Form), '0000000017b1617400000000730ca197:Symfony\Component\Form\Form:children', object(PropertyMetadata), 'children[step1].children[description_short].children', array('Default'), array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:577)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(Form), '0000000017b1617400000000730ca197', object(ClassMetadata), 'children[step1].children[description_short]', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(Form), 'children[step1].children[description_short]', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:408)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateEachObjectIn(object(OrderedHashMap), 'children[step1].children', array('Default'), object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:611)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(OrderedHashMap), '0000000017b160e100000000730ca197', object(ClassMetadata), 'children[step1].children', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(OrderedHashMap), 'children[step1].children', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:724)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateGenericNode(object(OrderedHashMap), object(Form), '0000000017b1609f00000000730ca197:Symfony\Component\Form\Form:children', object(PropertyMetadata), 'children[step1].children', array('Default'), array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:577)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(Form), '0000000017b1609f00000000730ca197', object(ClassMetadata), 'children[step1]', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(Form), 'children[step1]', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:408)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateEachObjectIn(object(OrderedHashMap), 'children', array('Default'), object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:611)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(OrderedHashMap), '0000000017b1685500000000730ca197', object(ClassMetadata), 'children', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(OrderedHashMap), 'children', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:724)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateGenericNode(object(OrderedHashMap), object(Form), '0000000017b1691600000000730ca197:Symfony\Component\Form\Form:children', object(PropertyMetadata), 'children', array('Default'), array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:577)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateClassNode(object(Form), '0000000017b1691600000000730ca197', object(ClassMetadata), '', array('Default'), null, 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:347)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validateObject(object(Form), '', array('Default'), 1, object(ExecutionContext))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php:139)
at Symfony\Component\Validator\Validator\RecursiveContextualValidator->validate(object(Form), null, array('Default'))
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/RecursiveValidator.php:100)
at Symfony\Component\Validator\Validator\RecursiveValidator->validate(object(Form), null, null)
(vendor/symfony/symfony/src/Symfony/Component/Validator/Validator/TraceableValidator.php:65)
at Symfony\Component\Validator\Validator\TraceableValidator->validate(object(Form))
(vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php:55)
at Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener->validateForm(object(FormEvent), 'form.post_bind', object(EventDispatcher))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:212)
at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(array(object(ValidationListener), 'validateForm'), array(object(DataCollectorListener), 'postSubmit')), 'form.post_bind', object(FormEvent))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('form.post_bind', object(FormEvent))
(vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php:33)
at Symfony\Component\EventDispatcher\ImmutableEventDispatcher->dispatch('form.post_bind', object(FormEvent))
(vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:665)
at Symfony\Component\Form\Form->submit(array(), true)
(vendor/symfony/symfony/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php:108)
at Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler->handleRequest(object(Form), object(Request))
(vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:498)
at Symfony\Component\Form\Form->handleRequest(object(Request))
(src/PrestaShopBundle/Controller/Admin/ProductController.php:559)
at PrestaShopBundle\Controller\Admin\ProductController->formAction('2719', object(Request))
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, false)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, false)
(cecilia/index.php:88)

screenshot-www seasideaquatics com-2018 08 27-09-00-56
screenshot-www seasideaquatics com-2018 08 27-08-20-23
screenshot-www seasideaquatics com-2018 08 27-08-59-46
screenshot-www seasideaquatics com-2018 08 27-09-00-01
screenshot-www seasideaquatics com-2018 08 27-09-00-56
screenshot-www seasideaquatics com-2018 08 27-09-02-28
screenshot-www seasideaquatics com-2018 08 27-09-03-11

@khouloudbelguith
Copy link
Contributor

Hi @thunt4jr,

It seems that a description is missing, and that's why it could not be listed in the "following errors".
Here's the PR about that issue in #9407.
If you're confident in modifying the core files manually, you can apply the changes to show the test in failure.

Best regards, Khouloud

@thunt4jr
Copy link
Author

It is also an issue with products that have over 10,000 wordings. New products and old products is the same issue.

@thunt4jr
Copy link
Author

I found the problem, it is posting in the database but not display on the backend. it will come up on the front end. So the description is not the problem. This is still an issue and looking for the solution.

@khouloudbelguith
Copy link
Contributor

Hi @thunt4jr,

So your issue is that products are saving in the Database, but not in the Back-end?

Best regards, Khouloud

@dave-lw
Copy link
Contributor

dave-lw commented Aug 31, 2018

i have a site with same problem too... but i dont believe it updates the db at all.
You can get me in hangouts Khouloud

@dave-lw
Copy link
Contributor

dave-lw commented Aug 31, 2018

thunt4j make a test php file

<?php echo iconv_strlen("Test iconv_strlen here", "UTF8"); ?>

if that error 500's either iconv.so exension in /etc/php/php.ini is commented out/disabled for some reason, or in my case there is a problem with it because it is active as shown by phpinfo...

@thunt4jr
Copy link
Author

It turned out to be PHP extension not installed on the server side. Iconv and 4 other extensions not installed. The server went from easy apache 3 to 4 without updating or finishing the installation. It work fine on my server until I transfer it to their server.

@dave-lw
Copy link
Contributor

dave-lw commented Sep 1, 2018

awesome, glad it is solved for you!

@marionf marionf changed the title Unable to save or change products Exception displayed when inconv extension isn't enabled Sep 4, 2018
@marionf marionf added Ready Status: Issue is ready to be worked on and removed NMI Status: issue needs more information labels Sep 4, 2018
@marionf
Copy link
Contributor

marionf commented Sep 4, 2018

Maybe we can add it as a requirement during install process ? @eternoendless

@thunt4jr
Copy link
Author

thunt4jr commented Sep 4, 2018

@marionf the problem with that was I had it on my development server before I transferred it to their server. It does show the extension that is required to be install when you install a fresh copy of Prestashop onto the server. What it doesn't show is the requirements when you transfer it. Maybe add in the Server information section in Advancement Parameters > Information what is required?

@marionf
Copy link
Contributor

marionf commented May 9, 2019

@khouloudbelguith

Could you try with 1.7.6.x branch and tell us if you have any warning during installation if inconv extension isn't enabled ?

@marionf marionf added TBR Status: issue to be reproduced and removed Ready Status: Issue is ready to be worked on labels May 14, 2019
@khouloudbelguith
Copy link
Contributor

Hi @marionf,

Yes, we have warnings during the installation if iconv extension is not enabled.
image
I close the issue.
Thanks!

@khouloudbelguith khouloudbelguith added Fixed Resolution: issue closed because fixed and removed TBR Status: issue to be reproduced labels May 15, 2019
@khouloudbelguith khouloudbelguith added this to the 1.7.6.0 milestone May 15, 2019
@khouloudbelguith khouloudbelguith removed their assignment May 15, 2019
@marionf
Copy link
Contributor

marionf commented May 15, 2019

Great ! Thank you @khouloudbelguith :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.4.2 Affects versions BO Category: Back Office Bug Type: Bug Fixed Resolution: issue closed because fixed Old Products Page Concerns the old product page
Projects
None yet
Development

No branches or pull requests

4 participants