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

Error on Creation of Attribute Option or Table Attributes #58

Open
andreaGft opened this issue May 4, 2021 · 1 comment
Open

Error on Creation of Attribute Option or Table Attributes #58

andreaGft opened this issue May 4, 2021 · 1 comment
Assignees

Comments

@andreaGft
Copy link

Hi,

I installed the bundle on my Akeneo PIM CE version 4.

Now, when I try to open the Attribute -> Option page I get this error:

request.CRITICAL: Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\UndefinedMethodError: "Attempted to call an undefined method named "isTableAttribute" of class "Akeneo\Pim\Structure\Component\Model\AttributeOption"." at /apps/bomax-pim/pim-community-standard/src/Flagbit/Bundle/TableAttributeBundle/Normalizer/AttributeOptionNormalizer.php line 26 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Attempted to call an undefined method named "isTableAttribute" of class "Akeneo\Pim\Structure\Component\Model\AttributeOption". at /apps/bomax-pim/pim-community-standard/src/Flagbit/Bundle/TableAttributeBundle/Normalizer/AttributeOptionNormalizer.php:26)"}

When I try to add an option to a Table Attribute I get this:

request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: "An exception occurred while executing 'SELECT t1.id AS id_2, t1.code AS code_3, t1.sort_order AS sort_order_4, t1.type AS type_5, t1.type_config AS type_config_6, t1.constraints AS constraints_7, t1.attribute_id AS attribute_id_8 FROM pim_catalog_attribute_option t1 WHERE t0.code = ? AND t0.attribute_id = ?' with params ["test", 97]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.code' in 'where clause'" at /apps/bomax-pim/pim-community-standard/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 60 {"exception":"[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing 'SELECT t1.id AS id_2, t1.code AS code_3, t1.sort_order AS sort_order_4, t1.type AS type_5, t1.type_config AS type_config_6, t1.constraints AS constraints_7, t1.attribute_id AS attribute_id_8 FROM pim_catalog_attribute_option t1 WHERE t0.code = ? AND t0.attribute_id = ?' with params ["test", 97]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.code' in 'where clause' at /apps/bomax-pim/pim-community-standard/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:60, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.code' in 'where clause' at /apps/bomax-pim/pim-community-standard/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.code' in 'where clause' at /apps/bomax-pim/pim-community-standard/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)"}

Is is a know issue for the Bundle?

Thank you
Andrea

@amansilla amansilla self-assigned this Oct 6, 2021
@amansilla
Copy link
Contributor

Hi, @andreaGft first thank you for using our Akeneo extensions and reporting the issue. It seems they are some columns missing in your database. Did you maybe forget to update the database schema as indicated in https://github.com/flagbit/akeneo-table-attribute-bundle#readme?

Just ensure you've run php bin/console --env=prod doctrine:schema:update --force and let me know if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants