Diseño web Mallorca's picture

Hi Guys, it's been now 1 week having fun with backdrop, and must say, has all the things I did expect for a Drupal 8, everything you need out of the box, it's there just to develop. Nice work sirs!

Just a little trouble that I found, and could be a core bug, may not. Anyway let me explain myself.

1.- Deleted a field of a node type. 

2.- View any node of that content type. 

Got this error: 

Error

array_merge(): Argument #2 must be of type array, null given

Also tried to make a update.php to solve it and got this message on the wizard that could be related. 

Warning: Trying to access array offset on value of type null in views_get_module_apis() (line 991 of /hosting/www/best-escorts-mallorca.com/public/core/modules/views/views.module).

Any suggestions? 

Thanks in advance

DerekSolutions

 

 

 

Accepted answer

That's going to be a tricky one to debug. My guess is that you had created blocks that displayed individual fields from a specific node, and now that that field is gone, the block rendering is failing.

Go to Structure > Layouts and open the layout that's generating the error, then inspect the blocks to see if any of them looks funny or was supposed to display a specific field. You can also remove all blocks and recreate that layout.

Comments

Derek, can you post the full error message for the first error you have there? Having the function and line will help troubleshoot the problem. You can get that from Reports > Recent log messages 

Diseño web Mallorca's picture

Hi, this would be the error find

Looks like something from the layout/block system, I did suppose it was fro the node, but i cant see that the just deleted field is in any block, of the selected layout for that node type.

 

TypeError: array_merge(): Argument #2 must be of type array, null given in array_merge() (line 186 of /hosting/www/best-cars-mallorca.com/public/core/modules/layout/includes/block.class.inc).

Diseño web Mallorca's picture

 

TypeError: array_merge(): Argument #2 must be of type array, null given in array_merge() (line 186 of /hosting/www/best-cars-mallorca.com/public/core/modules/layout/includes/block.class.inc).

That's going to be a tricky one to debug. My guess is that you had created blocks that displayed individual fields from a specific node, and now that that field is gone, the block rendering is failing.

Go to Structure > Layouts and open the layout that's generating the error, then inspect the blocks to see if any of them looks funny or was supposed to display a specific field. You can also remove all blocks and recreate that layout.

Diseño web Mallorca's picture

Yes, I just add to create again the custom layout and placed the blocks again and seems fine , but seems a core bug. 

Thanks sir!

Diseño web Mallorca's picture

Hi, facing the same issue now, but the thing is that I cant access the admin UI to solve this issue. Any hints?? Thank you

 

error

array_merge(): Argument #1 must be of type array, null given

IF this is the same issue as before (I doubt it, since that core bug was fixed), and you can't access the UI, try manually editing the JSON file for the layout that's creating the problem. You can find that one inside files/config_XXX/active. 

IF the layout is not the default one (for example, if the layout that's causing the problem is a layout you created), the first thing I'd try is to disable it by changing it's disabled property to true. This will prevent Backdrop from trying to use it. You may need to clear the caches after that. That can be a problem, unless you insall bee and run "bee cc all" in the shell/command line. Or try access the UI for the cache clear form directly at admin/config/development/performance

Once again, it's helpful for people reporting problem to post the entire error, not just the "headlines". That can help someone determine where the problem is.

Sorry, I meant change the disabled property to true. Edited my response above.