- First commit to issue fork.
- πΊπΈUnited States billdaff
Created and submitted MR for this. Not sure if its the complete solution or not but it got me to use aggregate in views using this field.
PhoneNumberInternationalFormatter::viewElements() generally expects all subfields to be present, no matter whether an extension is collected and entered.
if ($phone_number = $util->getPhoneNumber($item->getValue()['value'], NULL, $item->getValue()['extension'])) {
However, there is one situation where except for ['value'] all other subfields might be absent: this is if the Phone Field is displayed in an aggregated view and (which is the default) only the value is grouped on. While value is set as group_column (so we don't get an SQL error like in π Switching on aggregation generates fatal "Column not found: 1054 Unknown column" SQL error when using multi-column Fields Needs work ), the other columns or at least ['extension'] need to be grouped as well.
Otherwise (and this is the default) this leads to the extension missing and, with notices being turned on to:
Notice: Undefined index: extension in Drupal\phone_number\Plugin\Field\FieldFormatter\PhoneNumberInternationalFormatter->viewElements() (line 77 of /var/www/html/testing/web/modules/contrib/phone_number/src/Plugin/Field/FieldFormatter/PhoneNumberInternationalFormatter.php). => Array ( [52: Drupal\phone_number\Plugin\Field\FieldFormatter\PhoneNumberInternationalFormatter->viewElements()] => Array ( [file] => modules/contrib/phone_number/src/Plugin/Field/FieldFormatter/PhoneNumberInternationalFormatter.php:77
Unsure if we should just check the 'extension' column's existence or investigate how to make sure the 'extension' column is always grouped on.
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Created and submitted MR for this. Not sure if its the complete solution or not but it got me to use aggregate in views using this field.