- Issue created by @Nickstedt
- Assigned to abhishek_virasat
- Issue was unassigned.
- Status changed to Needs review
10 months ago 12:37pm 15 February 2024 - last update
10 months ago 10 pass - 🇮🇳India abhishek_virasat
@Nickstedt , I have fixed the issue . please kindly review the patch file
- Status changed to Fixed
10 months ago 12:45pm 15 February 2024 - 🇳🇱Netherlands johnv
The patch does not add the data in both cases.
i used the following construct:$field_data['field'] ??= []; $field_data['field'] += $data[$table_name]['delta']['field'];
Since it breaks you system, i will release now.
- 🇪🇪Estonia rang501 Viljandi
I just updated to 1.15 and it seems to be broken
TypeError: Unsupported operand types: array + null in Drupal\office_hours\Plugin\views\field\FieldBase::viewsFieldData() (line 81 of modules/contrib/office_hours/src/Plugin/views/field/FieldBase.php).
- 🇺🇸United States ethangeorgi
Ditto: we just updated to 1.15 and it seems to be broken for us as well. I don't see that the patch, or the "construct," are in the new code.
- Status changed to Needs work
10 months ago 8:15am 16 February 2024 - 🇳🇱Netherlands johnv
Please make sure that you truly have 1.15. It was released shortly after 1.14, which does not have the patch.
Also make sure that all caches are refreshed.
Please report back. I will check again. - 🇺🇸United States ethangeorgi
Sure. I just ran composer update and it had nothing new.
composer info drupal/office_hours
name : drupal/office_hours
descrip. : Defines a 'weekly office hours' field type, allowing you to specify when an Entity is open or closed.
keywords :
versions : * 1.15.0
type : drupal-module
license : GNU General Public License v2.0 or later (GPL-2.0+) (OSI approved) https://spdx.org/licenses/GPL-2.0+.html#licenseText
homepage : http://drupal.org/project/office_hours
source : [git] https://git.drupalcode.org/project/office_hours.git 8.x-1.15
dist : [zip] https://ftp.drupal.org/files/projects/office_hours-8.x-1.15.zip 8.x-1.15
path : /Users/ethan/Documents/Lando/rpi-registrar/web/modules/contrib/office_hours
names : drupal/office_hoursDrupal Available Updates Report says
Office Hours 8.x-1.15
Includes: Office HoursFlushing the cache gives me
The website encountered an unexpected error. Try again later.drush ws gives me
3158 16/Feb 07:57 php Error TypeError: Unsupported operand types: array + null in Drupal\office_hours\Plugin\views\field\FieldBase::viewsFieldData() (line 81 of /app/web/modules/contrib/office_hours/src/Plugin/views/ - 🇳🇱Netherlands johnv
Please test new dev version.
The patch removes the error message, but does not resolve the root cause.
I do not understand this this can happen.
You may have problems using the new 'season' and 'timeslot' fields in Views (to be used as columns in a view). - 🇺🇸United States ethangeorgi
The dev version works for me. The site I'm testing with loads now, without errors. It was not using new "season" fields.
I can see the new code from the patch in this version of FieldBase.php, and I couldn't in 1.15, so that looks better.
I am concerned about "does not resolve the root cause."
Thanks for your work on this!
- Status changed to Fixed
10 months ago 3:56pm 16 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.