backdrop-contrib / gdpr_cookies

Control cookies from all sources with tarteaucitron.js to meet GDPR.
GNU General Public License v2.0
0 stars 3 forks source link

Updating to 1.x-1.3.2 throws PHP fatal gdpr_cookies_service has no base table #21

Open jenlampton opened 3 years ago

jenlampton commented 3 years ago

After updating from 1.x-1.0.0 to 1.x-1.3.2 I see this fatal error at the bottom of every rendered page:

EntityFieldQueryException: Entity <em class="placeholder">gdpr_cookies_service</em> has no base table. in EntityFieldQuery->propertyQuery() (line 829 of backdrop/core/modules/entity/entity.query.inc). 

I'm reverting back to 1.x-1.0.0 for the time being.

plazmus commented 2 years ago

I had the same issue, but uninstalling it first and then installing 1.x-1.3.2 worked. There's also an issue with the base path for some links, so I fixed that.

@@ -374,10 +374,10 @@ function gdpr_cookies_service_list_entities() {

   $content = array();

-
   $content['add_button'] = array(
-    '#type' => 'markup',
-    '#markup' => '<a href="/admin/config/system/gdpr-cookies/gdpr-cookies-service/add">' . t('+ Add third party service') . '</a>',
+    '#type'  => 'link',
+    '#title' => t('+ Add third party service'),
+    '#href'  => 'admin/config/system/gdpr-cookies/gdpr-cookies-service/add',
   );

@@ -391,11 +391,12 @@ function gdpr_cookies_service_list_entities() {
           'name' => $entity->getName(),
           'vanisher' => $entity->getVanisher(),
           'enabled' => $entity->isEnabled() ? t('Enabled') : t('Disabled'),
-          'edit' => "<a href='/admin/config/system/gdpr-cookies/gdpr-cookies-service/" . $entity->getName() . "'>" . t('Edit') . "</a>",
-          'delete' => "<a href='/admin/config/system/gdpr-cookies/gdpr-cookies-service/" . $entity->getName() . "/delete'>" . t('Delete') . "</a>",
+          'edit' => l( t('Edit'), 'admin/config/system/gdpr-cookies/gdpr-cookies-service/' . $entity->getName()),
+          'delete' => l( t('Delete'), 'admin/config/system/gdpr-cookies/gdpr-cookies-service/' . $entity->getName() . '/delete'),
         )
       );
     }
+
     // Put our entities into a themed table. See theme_table() for details.
     $content['entity_table'] = array(
       '#theme' => 'table',

What I don't like about that new update is that after accepting cookies, there's a small tarteaucitron icon in the corner. And I can't figure out how to point to a different language file.

jenlampton commented 2 years ago

I had the same issue, but uninstalling it first and then installing 1.x-1.3.2 worked.

I had the same solution. It looks like the module is missing an update hook for the differences in 1.x-1.3.2.