Unable to place GAMW ad blocks - AJAX error likely caused by PHP error

Created on 27 July 2022, over 2 years ago
Updated 15 February 2024, 10 months ago

Problem/Motivation

Attempting to place an ad block fails (results in an error that can be seen in console).

AJAX error:

Uncaught
Object { message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /admin/structure/block/add/gamw/example?region=sidebar_first\nStatusText: OK\nResponseText: ", name: "AjaxError", stack: "@https://dev.example.com/sites/default/files/js/js_LS4djmx8InBABTJ-bazRpr...\n@https://dev.example.com/sites/default/files/js/js_LS4djmx8InBABTJ-bazRpr...\n" }

Suspiciously coincidentally timed PHP error:

TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 116 of web/modules/contrib/gamw/src/Plugin/Block/Gamw.php

Steps to reproduce

  1. Configure GAMW, uploading ad units CSV file with the following columns: #Id, Parent Id, Code, Name, Sizes, Description, Enabled for AdSense, Placements, Target Window, Labels (where Description, Placement, and Labels are blank for each row)
  2. Go to block admin page and attempt to place a GAMW Advertisement block.

Proposed resolution

Clearly this is not happening to everyone; is there a step i am missing?

Remaining tasks

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

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.

  • First commit to issue fork.
Production build 0.71.5 2024