Problem/Motivation

322 15/Jan 16:45 php Error TypeError: array_intersect(): Argument #2 must be of type array, null given in array_intersect() (line 225 of /var/www/docroot/modules/contrib/piwik_pro/src/PiwikProSnippet.php).
321 15/Jan 16:45 php Error ArgumentCountError: Too few arguments to function Drupal\piwik_pro\PiwikProSnippet::__construct(), 5 passed in /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php
320 15/Jan 16:45 php Error ArgumentCountError: Too few arguments to function Drupal\piwik_pro\PiwikProSnippet::__construct(), 5 passed in /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php
319 15/Jan 16:45 php Error ArgumentCountError: Too few arguments to function Drupal\piwik_pro\PiwikProSnippet::__construct(), 5 passed in /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php
318 15/Jan 16:45 php Error ArgumentCountError: Too few arguments to function Drupal\piwik_pro\PiwikProSnippet::__construct(), 5 passed in /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php
317 15/Jan 16:45 page not found Warning /themes/custom/siu/images/icons/custom-icons/%20%20%20%20%20%20%20%20%20%20%20%20siu_stethescope_thick%20%20%20%20%20%20.svg
316 15/Jan 16:45 page not found Warning /themes/custom/siu/images/icons/custom-icons/%20%20%20%20%20%20%20%20%20%20%20%20siu_medical_cross_on_computer%20%20%20%20%20%20.svg
315 15/Jan 16:45 page not found Warning /themes/custom/siu/images/icons/custom-icons/%20%20%20%20%20%20%20%20%20%20%20%20siu_caduceus_sybmol%20%20%20%20%20%20.svg
314 15/Jan 16:45 page not found Warning /themes/custom/siu/images/icons/custom-icons/%20%20%20%20%20%20%20%20%20%20%20%20people%20%20%20%20%20%20.svg
313 15/Jan 16:45 php Error ArgumentCountError: Too few arguments to function Drupal\piwik_pro\PiwikProSnippet::__construct(), 5 passed in /var/www/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php

Steps to reproduce

  1. Upgrade from (1.1.1 => 1.2.0)
  2. Goto /admin/config/services/piwik-pro
  3. Populate fields
  4. Leave uncheck all roles
  5. Save
CommentFileSizeAuthor
#3 3500094-piwik_pro-typeerror-fix-3.patch670 bytes_renify_

Issue fork piwik_pro-3500094

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

_renify_ created an issue. See original summary.

_renify_’s picture

Issue summary: View changes
_renify_’s picture

StatusFileSize
new670 bytes

heikkiy made their first commit to this issue’s fork.

heikkiy’s picture

Status: Active » Needs review

Thank you for reporting this. We noticed similar issues before releasing 1.2.0 but seems we missed this part.

I created a merge request and added fallback values for this and a couple more new configs.

Does this MR fix your issue?

heikkiy’s picture

Added other fallback values also and all pipelines are now passing.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Tried reproducing the issue, was able to reproduce it
Applied the patch from the MR and it fixes the issue
All pipelines are also green
Moving it to RTBC+

heikkiy’s picture

Excellent thanks. I added a couple more automated tests to make sure that the default empty settings also work. We will try to get 1.2.1 released ASAP.

Anonymous’s picture

Great, thanks!

dimas11’s picture

I’m unable to reproduce the issue as described. There is an update hook (piwik_pro_update_9102()) that writes the configurations, so they should not be null if the update has been applied. Additionally, after saving the configuration form, the configurations are always populated with the corresponding values.

Could it be that the workflow is more complex than described in the task? In any case, the fix seems fine.

  • heikkiy committed 4cd307e6 on 1.2.x
    Issue #3500094 by heikkiy, _renify_, akulsaxena, dimas11: TypeError:...
heikkiy’s picture

Status: Reviewed & tested by the community » Fixed

Fixed and merged.

Status: Fixed » Closed (fixed)

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