"Place block" is throwing an error: PHP Notice: Undefined index: quick_node in /Users/lennart/Documents/htdocs/digipolis/kotd8/project/web/modules/contrib/quick_node_block/src/Plugin/Block/QuickNodeBlock.php on line 86

I marked the issue as critical because the module doesn't work due to this issue.

Comments

L.V.V. created an issue. See original summary.

fernly’s picture

StatusFileSize
new1.57 KB

See the attached patch for a solution.

fernly’s picture

StatusFileSize
new1.7 KB

New patch, fixed one more notice concerning this issue.

saesa’s picture

Status: Needs review » Active

Does the problem occur when you place a new block? What configuration has been applied to the block? I would need more information, thanks.

fernly’s picture

When creating a new block, the block settings form tries to load non existing config which causes the error.

Steps to reproduce:

  1. Clean install the module
  2. Go to Structure > Block layout
  3. Click "Place block" on any region
  4. In the popup, click "Place block" next to the "Quick node block" => this results in the error.
saesa’s picture

I did the following:

  1. Clean install the module.
  2. Go to Structure > Block layout
  3. Click "Place block" on any region.
  4. In the popup, click "Place block"
  5. It says me that the node field cannot be empty.
  6. I put the node and the display and I don't get any error.

If you could further expand the information, thanks.

arnaldop’s picture

StatusFileSize
new921 bytes

I'm finding that, while the general points of this patch fix my problem, something is off with where the changes are applied.
Some of the changes containing ?? are already present in 8.x-1.2, and some are not. Thus, the patch fails.

I am attaching a patch that has no conflicts with 8.x-1.2, and applies the ?? changes to the lines specified in the #3 patch.

I do not have a clean environment to test with, and I already had Quick Node Block working in other sections, but I found the problem when I tried to add a new Quick Node Block via the "Place Block" button within a Context. I cannot say it's specific to the Contexts module.

arnaldop’s picture

StatusFileSize
new1.48 KB

Ugh, hate it when this happens.
The root path was wrong in patch #7.
Here's the update.

arnaldop’s picture

StatusFileSize
new1.99 KB

So sorry, I missed a line in the last patch.

saesa’s picture

Status: Active » Needs work

It is not possible to apply the patch src/Plugin/Block/QuickNodeBlock.php:97

naveenvalecha’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.7 KB

Here's the fresh patch

  • saesa committed 84f308c on 8.x-1.x
    Issue #3088008 by arnaldop, Fernly, naveenvalecha: Place block is not...
saesa’s picture

Status: Needs review » Fixed

Changes made, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.