Problem deleting ads

Created on 26 May 2016, about 9 years ago
Updated 20 July 2025, 8 days ago

Issue is with the following method in class dfp_tag_ui.class.php

function delete_page($js, $input, $item) {
    $delta = drupal_strlen($item->machinename) >= 32 ? md5($item->machinename) : $item->machinename;
    db_delete('block')
      ->condition('module', 'dfp')
      ->condition('delta', $delta)
      ->execute();

    return parent::delete_page($js, $input, $item);
  }

If the block module is not enabled / uninstalled, there is no way to delete an ad as it will throw a PDO Exception due to there being no block db table. The block module is not listed as a dependency and should not be as there is an option to not display ads as blocks.

🐛 Bug report
Status

Closed: outdated

Version

1.4

Component

Code

Created by

🇬🇧United Kingdom shires82

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024