backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Module is broken when it comes to fresh installations... #132

Closed rbargerhuff closed 2 years ago

rbargerhuff commented 2 years ago

The issue my colleague and I just discovered is that Paragraphs is broken on fresh installations.

With our Drupal 7 installation, we did not use the entitycache module. With the migration of Backdrop and the use of the latest version of the Paragraphsmodule, we have encountered a scenario where Paragraphs module will NOT create the tables needed, in particular the table cache_entity_paragraphs_item

The code as it currently sits in paragraphs.module

paragraphs.module 1594:

if (module_exists('entitycache') && !db_table_exists('cache_entity_paragraphs_item')) {
    backdrop_load('module', 'entitycache');
    $cache_schema = backdrop_get_schema_unprocessed('system', 'cache');
    $cache_schema['description'] = 'Cache table used to store paragraphs_item entity records.';
    db_create_table('cache_entity_paragraphs_item', $cache_schema);
 }

This code is never executed because entitycache is part of Backdrop core.

Because the codebase forces entity cache to TRUE:

paragraphs.module 155:

$return['paragraphs_item']['entity cache'] = TRUE;

This results in the following error:

$ bee cc all
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ds306.cache_entity_paragraphs_item' doesn't exist: TRUNCATE {cache_entity_paragraphs_item} ; Array
(
)
 in backdrop_flush_all_caches() (line 8599 of /var/www/bargerhuff/ds305/webroot/core/includes/common.inc).
argiepiano commented 2 years ago

You must be using version 1.1.0 of Paragraphs. Please check.

Because of a bug with the Backdrop CMS module portal the Paragraphs version listed here is wrong. The current version 1.2.0-beta must be be manually downloaded from here

I'm not a maintainer of Paragraph, but this issue has been reported in the past. @laryn - perhaps you or @bugfolder can manually edit the Backdrop CMS record that points to the wrong version?

laryn commented 2 years ago

@rbargerhuff I've released 1.x-1.2.0 today, in case the beta was scaring you off. Thanks @argiepiano for helping figure out the issue here.

rbargerhuff commented 2 years ago

@argiepiano @laryn Thank you very much! I didn't see your comments and I appreciate how quickly you responded. I am juggling a lot of work right now and did not notice.

We were using 1.20-beta1 when I first reported that issue. Upgrading to 1.20 addressed the issue and I have confirmed the fix.

Cheers to you both!