Adding localizedfield to the existing class issues

Define / Create / Use Object-Classes, Fieldcollections, Object-Bricks, Variants, Inheritance, Custom Fields, ...
Post Reply
milena
Posts: 7
Joined: Thu Mar 26, 2015 1:13 pm

Adding localizedfield to the existing class issues

Post by milena » Thu Sep 10, 2015 3:27 pm

Hi all!

I've been trying to add a localizedfield to the existing object class, but the object_localized_{x}_{lng} tables are missing (except for the en_GB!?)

Code: Select all

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'creative_db.object_localized_8_de' doesn't exist, query was:
SELECT object_localized_8_de.o_id AS o_id,o_type FROM `object_localized_8_de`
WHERE ( o_type IN ('object','folder')) AND o_published = 1 LIMIT 4


Happy class

happy.PNG
happy.PNG (12.01 KiB) Viewed 10818 times


And this change generates error (I've also tried adding images under existing localized field, but with the same results)

structure.PNG
structure.PNG (17.92 KiB) Viewed 10818 times


Even more baffling is the fact that pimcore generates input widgets for every supported languages. Also, object_localized_query_{classId}_{language} tables get created for every configured language.

Just to mention, system requirements check seems all fine.

Any ideas? Or am I missing something obvious?

Many thanks,

Milena

User avatar
IgorBenko
Posts: 689
Joined: Thu Jul 21, 2011 4:33 pm
Location: Berlin
Contact:

Re: Adding localizedfield to the existing class issues

Post by IgorBenko » Thu Sep 10, 2015 3:51 pm

Hello,

what is your pimcore version?

Cheers
Igor
basilicom GmbH - Official Pimcore Selected Company - http://basilicom.de/de/pimcore

milena
Posts: 7
Joined: Thu Mar 26, 2015 1:13 pm

Re: Adding localizedfield to the existing class issues

Post by milena » Thu Sep 10, 2015 4:06 pm

Hi Igor,

I'm on 3.0.6.

Thanks!

User avatar
IgorBenko
Posts: 689
Joined: Thu Jul 21, 2011 4:33 pm
Location: Berlin
Contact:

Re: Adding localizedfield to the existing class issues

Post by IgorBenko » Thu Sep 10, 2015 4:16 pm

Hi Milena,

with that version it should work as expected. Did you change any rights of the MySQL user? Try granting all rights to the mysql user that is set in the pimcore configuration.

Cheers,
Igor
basilicom GmbH - Official Pimcore Selected Company - http://basilicom.de/de/pimcore

milena
Posts: 7
Joined: Thu Mar 26, 2015 1:13 pm

Re: Adding localizedfield to the existing class issues

Post by milena » Thu Sep 10, 2015 4:42 pm

That was my first thought too, but the user has all the privileges granted already.
In fact, here's my system requirements check:

system.PNG


M.

User avatar
IgorBenko
Posts: 689
Joined: Thu Jul 21, 2011 4:33 pm
Location: Berlin
Contact:

Re: Adding localizedfield to the existing class issues

Post by IgorBenko » Thu Sep 10, 2015 5:31 pm

Sorry, I am out of ideas. Anything in the logs? /website/var/log/debug/log

Igor
basilicom GmbH - Official Pimcore Selected Company - http://basilicom.de/de/pimcore

penz-photo
Posts: 12
Joined: Wed Feb 13, 2013 1:37 pm

Re: Adding localizedfield to the existing class issues

Post by penz-photo » Tue Sep 29, 2015 2:04 pm

Do you have found any solution for your problem?
I have the same that the object_localized_{x}_{lng} tables are missing. On my Server run two different Pimcore applications but on the other application all works fine.

Edit:
Error Log

Code: Select all

2015-09-29T14:25:02+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli statement execute error : Can't DROP 'p_index_localizedfields'; check that column/key exists
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 214
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('ALTER TABLE `ob...')
#3 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(331): Pimcore\Resource\Wrapper->__call('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(331): Pimcore\Resource\Wrapper->query('ALTER TABLE `ob...')
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(222): Pimcore\Model\Object\ClassDefinition\Resource->addIndexToField(Object(Pimcore\Model\Object\ClassDefinition\Data\Localizedfields), 'object_query_21')
#8 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(97): Pimcore\Model\Object\ClassDefinition\Resource->update()
#9 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(221): Pimcore\Model\Object\ClassDefinition\Resource->save()
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#15 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#16 {main}
2015-09-29T14:25:02+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli statement execute error : Can't DROP 'p_index_localizedfields'; check that column/key exists
    [method] => query
    [arguments] => Array
        (
            [0] => ALTER TABLE `object_query_21` DROP INDEX `p_index_localizedfields`;
        )

)

2015-09-29T14:25:02+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli statement execute error : Can't DROP 'p_index_localizedfields'; check that column/key exists
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 214
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('ALTER TABLE `ob...')
#3 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(331): Pimcore\Resource\Wrapper->__call('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(331): Pimcore\Resource\Wrapper->query('ALTER TABLE `ob...')
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(223): Pimcore\Model\Object\ClassDefinition\Resource->addIndexToField(Object(Pimcore\Model\Object\ClassDefinition\Data\Localizedfields), 'object_store_21')
#8 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Resource.php(97): Pimcore\Model\Object\ClassDefinition\Resource->update()
#9 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(221): Pimcore\Model\Object\ClassDefinition\Resource->save()
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#15 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#16 {main}
2015-09-29T14:25:02+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli statement execute error : Can't DROP 'p_index_localizedfields'; check that column/key exists
    [method] => query
    [arguments] => Array
        (
            [0] => ALTER TABLE `object_store_21` DROP INDEX `p_index_localizedfields`;
        )

)

2015-09-29T14:25:02+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli statement execute error : Can't DROP 'p_index_headline'; check that column/key exists
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 214
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('ALTER TABLE `ob...')
#3 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(537): Pimcore\Resource\Wrapper->__call('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(537): Pimcore\Resource\Wrapper->query('ALTER TABLE `ob...')
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(437): Pimcore\Model\Object\Localizedfield\Resource->addIndexToField(Object(Pimcore\Model\Object\ClassDefinition\Data\Input), 'object_localize...')
#8 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#9 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#18 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#19 {main}
2015-09-29T14:25:02+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli statement execute error : Can't DROP 'p_index_headline'; check that column/key exists
    [method] => query
    [arguments] => Array
        (
            [0] => ALTER TABLE `object_localized_data_21` DROP INDEX `p_index_headline`;
        )

)

2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli statement execute error : Can't DROP 'p_index_headline'; check that column/key exists
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 214
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('ALTER TABLE `ob...')
#3 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(537): Pimcore\Resource\Wrapper->__call('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(537): Pimcore\Resource\Wrapper->query('ALTER TABLE `ob...')
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(488): Pimcore\Model\Object\Localizedfield\Resource->addIndexToField(Object(Pimcore\Model\Object\ClassDefinition\Data\Input), 'object_localize...')
#8 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#9 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#18 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#19 {main}
2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli statement execute error : Can't DROP 'p_index_headline'; check that column/key exists
    [method] => query
    [arguments] => Array
        (
            [0] => ALTER TABLE `object_localized_query_21_de` DROP INDEX `p_index_headline`;
        )

)

2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli statement execute error : Can't DROP 'p_index_headline'; check that column/key exists
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 214
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('ALTER TABLE `ob...')
#3 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(537): Pimcore\Resource\Wrapper->__call('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(537): Pimcore\Resource\Wrapper->query('ALTER TABLE `ob...')
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(488): Pimcore\Model\Object\Localizedfield\Resource->addIndexToField(Object(Pimcore\Model\Object\ClassDefinition\Data\Input), 'object_localize...')
#8 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#9 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#18 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#19 {main}
2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli statement execute error : Can't DROP 'p_index_headline'; check that column/key exists
    [method] => query
    [arguments] => Array
        (
            [0] => ALTER TABLE `object_localized_query_21_en` DROP INDEX `p_index_headline`;
        )

)

2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli prepare error: Table 'admin_woodkplus.object_localized_query_21_de_DE' doesn't exist
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 77
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('CREATE OR REPLA...')
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'CREATE OR REPLA...')
#2 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('CREATE OR REPLA...')
#3 [internal function]: Zend_Db_Adapter_Abstract->query('CREATE OR REPLA...')
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->__call('query', Array)
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->query('CREATE OR REPLA...')
#8 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(497): Pimcore\Model\Object\Localizedfield\Resource->createLocalizedViews()
#9 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#18 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#19 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#20 {main}
2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli prepare error: Table 'admin_woodkplus.object_localized_query_21_de_DE' doesn't exist
    [method] => query
    [arguments] => Array
        (
            [0] => CREATE OR REPLACE VIEW `object_localized_21_de` AS

SELECT `oo_id`,`oo_classId`,`oo_className`,`o_id`,`o_parentId`,`o_type`,`o_key`,`o_path`,`o_index`,`o_published`,`o_creationDate`,`o_modificationDate`,`o_userOwner`,`o_userModification`,`o_classId`,`o_className`,ifnull(`de`.`ooo_id`, `de_DE`.`ooo_id`) as "ooo_id",ifnull(`de`.`language`, `de_DE`.`language`) as "language",ifnull(`de`.`headline`, `de_DE`.`headline`) as "headline"
FROM `object_query_21`
    JOIN `objects`
        ON (`objects`.`o_id` = `object_query_21`.`oo_id`)LEFT JOIN object_localized_query_21_de as de
    ON( 1
        AND object_query_21.oo_id = de.ooo_id
    )LEFT JOIN object_localized_query_21_de_DE as de_DE
    ON( 1
        AND object_query_21.oo_id = de_DE.ooo_id
    )
        )

)

2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Pimcore\Model\Object\Localizedfield\Resource->createLocalizedViews() [392]: [Exception] with message: Mysqli prepare error: Table 'admin_woodkplus.object_localized_query_21_de_DE' doesn't exist
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 77
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('CREATE OR REPLA...')
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'CREATE OR REPLA...')
#2 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('CREATE OR REPLA...')
#3 [internal function]: Zend_Db_Adapter_Abstract->query('CREATE OR REPLA...')
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->__call('query', Array)
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->query('CREATE OR REPLA...')
#8 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(497): Pimcore\Model\Object\Localizedfield\Resource->createLocalizedViews()
#9 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#18 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#19 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#20 {main}
2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Pimcore\Resource\Mysql::errorHandler() [312]: [Exception] with message: Mysqli prepare error: Table 'admin_woodkplus.object_localized_query_21_de_DE' doesn't exist
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 77
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('CREATE OR REPLA...')
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'CREATE OR REPLA...')
#2 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('CREATE OR REPLA...')
#3 [internal function]: Zend_Db_Adapter_Abstract->query('CREATE OR REPLA...')
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->__call('query', Array)
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->query('CREATE OR REPLA...')
#8 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(497): Pimcore\Model\Object\Localizedfield\Resource->createLocalizedViews()
#9 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#18 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#19 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#20 {main}
2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Array
(
    [message] => Mysqli prepare error: Table 'admin_woodkplus.object_localized_query_21_de_DE' doesn't exist
    [method] => query
    [arguments] => Array
        (
            [0] => CREATE OR REPLACE VIEW `object_localized_21_en` AS

SELECT `oo_id`,`oo_classId`,`oo_className`,`o_id`,`o_parentId`,`o_type`,`o_key`,`o_path`,`o_index`,`o_published`,`o_creationDate`,`o_modificationDate`,`o_userOwner`,`o_userModification`,`o_classId`,`o_className`,ifnull(`en`.`ooo_id`, `de_DE`.`ooo_id`) as "ooo_id",ifnull(`en`.`language`, `de_DE`.`language`) as "language",ifnull(`en`.`headline`, `de_DE`.`headline`) as "headline"
FROM `object_query_21`
    JOIN `objects`
        ON (`objects`.`o_id` = `object_query_21`.`oo_id`)LEFT JOIN object_localized_query_21_en as en
    ON( 1
        AND object_query_21.oo_id = en.ooo_id
    )LEFT JOIN object_localized_query_21_de_DE as de_DE
    ON( 1
        AND object_query_21.oo_id = de_DE.ooo_id
    )
        )

)

2015-09-29T14:25:03+02:00 ERR (3):  10 MB | Pimcore\Model\Object\Localizedfield\Resource->createLocalizedViews() [392]: [Exception] with message: Mysqli prepare error: Table 'admin_woodkplus.object_localized_query_21_de_DE' doesn't exist
In file: /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 77
#0 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('CREATE OR REPLA...')
#1 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'CREATE OR REPLA...')
#2 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('CREATE OR REPLA...')
#3 [internal function]: Zend_Db_Adapter_Abstract->query('CREATE OR REPLA...')
#4 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array)
#5 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('query', Array)
#6 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->__call('query', Array)
#7 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(389): Pimcore\Resource\Wrapper->query('CREATE OR REPLA...')
#8 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/Localizedfield/Resource.php(497): Pimcore\Model\Object\Localizedfield\Resource->createLocalizedViews()
#9 [internal function]: Pimcore\Model\Object\Localizedfield\Resource->createUpdateTable()
#10 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore/Model/AbstractModel.php(250): call_user_func_array(Array, Array)
#11 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\AbstractModel->__call('createUpdateTab...', Array)
#12 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition/Data/Localizedfields.php(565): Pimcore\Model\Object\Localizedfield->createUpdateTable()
#13 /var/www/vhosts/sery.ml/httpdocs/pimcore/models/Object/ClassDefinition.php(327): Pimcore\Model\Object\ClassDefinition\Data\Localizedfields->classSaved(Object(Pimcore\Model\Object\ClassDefinition))
#14 /var/www/vhosts/sery.ml/httpdocs/pimcore/modules/admin/controllers/ClassController.php(353): Pimcore\Model\Object\ClassDefinition->save()
#15 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Action.php(516): Admin_ClassController->saveAction()
#16 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('saveAction')
#17 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#18 /var/www/vhosts/sery.ml/httpdocs/pimcore/lib/Pimcore.php(285): Zend_Controller_Front->dispatch()
#19 /var/www/vhosts/sery.ml/httpdocs/index.php(18): Pimcore::run()
#20 {main}

User avatar
johan.lindgren@ateles.se
Community Support
Posts: 871
Joined: Fri Apr 27, 2012 8:18 am
Location: Sweden
Contact:

Re: Adding localizedfield to the existing class issues

Post by johan.lindgren@ateles.se » Tue Sep 29, 2015 5:40 pm

What if you backup your system and tries to export, import and save your existing class? Could you by any chance have restored files and db with versions not matching, making the files in website/var/classes being bad? If do the above sequence of export/import and saving should fix it.
/Johan
---------------------------------------------------------------------
Ateles Consulting AB - a Pimcore Professional Partner

Post Reply

Return to “Objects”



Who is online

Users browsing this forum: No registered users and 1 guest