Jump to content
thirty bees forum
  • 0

Error creating new category > Table est_image_entity' doesn't exist in file classes/ImageEntity.php at line 332


Raymond

Question

Hello

I installed tb 1.5.1

I read the information and saw that I was warned about using php 8.3

Tried to use core update and could not go, I changed to PHP 7.4, ran core updater again, and managed to update to latest main developer version, at final step gave me an error telling I had to use PHP 8.3 this time

So I reverted to PHP 8.3 and ran core updater again, the script gave OK, and finally TB got up and working

I fiddled around configuring and testing lots of things, all seemed to work fine, just apparently btw, that until I tried to create a new category and got this error after saving:

Unknown column 'additional_description' in 'field list'

when trying to edit the category I got 500 server error and downloaded the encrypted error message containing this information among other (if needed I can send the

Table xxxx_xxxx.est_image_entity' doesn't exist

in file classes/ImageEntity.php at line 332

Source file: classes/ImageEntity.php

this line is marked in red into the encrypted error message:
332:            $result = Db::getInstance()->getArray($query);

Here below the whole encrypted message:

SQL

SELECT ie.*,
l.display_name,
it.id_image_type, it.name AS image_type, it.width, it.height, it.id_image_type_parent
FROM `est_image_entity` ie
LEFT JOIN `est_image_entity_type` `iet` ON (iet.id_image_entity = ie.id_image_entity)
LEFT JOIN `est_image_type` `it` ON (iet.id_image_type = it.id_image_type)
LEFT JOIN `est_image_entity_lang` `l` ON (l.id_image_entity = ie.id_image_entity AND l.id_lang = 1)
ORDER BY ie.name ASC

Source file: classes/ImageEntity.php

313:     *
314:     * @throws PrestaShopDatabaseException
315:     * @throws PrestaShopException
316:     */
317:    public static function getImageEntities(): array
318:    {
319:        $langId = (int)Context::getContext()->language->id;
320:        $cacheKey = 'ImageEntity::getImageEntities_' . $langId;
321:        if (! Cache::isStored($cacheKey)) {
322:            $query = new DbQuery();
323:            $query->select('ie.*');
324:            $query->select('l.display_name');
325:            $query->from(static::$definition['table'], 'ie');
326:            $query->select('it.id_image_type, it.name AS image_type, it.width, it.height, it.id_image_type_parent');
327:            $query->leftJoin('image_entity_type', 'iet', '(iet.id_image_entity = ie.id_image_entity)');
328:            $query->leftJoin('image_type', 'it', '(iet.id_image_type = it.id_image_type)');
329:            $query->leftJoin('image_entity_lang', 'l', '(l.id_image_entity = ie.id_image_entity AND l.id_lang = '.$langId.')');
330:            $query->orderBy('ie.name ASC');
331:
332:            $result = Db::getInstance()->getArray($query);
333:
334:            $imageEntities = [];
335:
336:            foreach ($result as $res) {
337:
338:                $name = $res['name'];
339:
340:                if (!isset($imageEntities[$name])) {
341:                    // Get data from object model $definition
342:                    $className = $res['classname'];

 

Trying to create a product output the exact same error, but directly at first attempt, the 500 error appears immediately and the panel to build the product does not even appear

What should I do to fix this?

Thank you in advance for any info and help.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello Datakick

Thank you, it worked.

Yes, in fact I had a fail, but when I ran core updater the second time I got a green bar telling everything was OK, somehow other errors happened without prompting warnings...

However using core updater a third time as you suggested fixed this problem, I go on testing now...

Thank you

Best regards

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...