Error: Call to a member function get() on null in quant_path_alias_presave()

Created on 7 January 2024, 6 months ago
Updated 20 January 2024, 5 months ago

Problem/Motivation

Was testing πŸ“Œ Core multilingual bug can prevent content from being sent to Quant Fixed and ran into the following when testing:

The website encountered an unexpected error. Please try again later.

Error: Call to a member function get() on null in quant_path_alias_presave() (line 416 of modules/contrib/quantcdn/quant.module).
call_user_func_array(Object, Array) (Line: 409)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'quant') (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('path_alias_presave', Object) (Line: 416)
Drupal\Core\Extension\ModuleHandler->invokeAll('path_alias_presave', Array) (Line: 215)
Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 900)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 529)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 753)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 82)
Drupal\path\Plugin\Field\FieldType\PathItem->postSave()

Steps to reproduce

See comment #88 πŸ› Language-specific aliases only work with url-based language negotiation Needs work in in the issue above.

Proposed resolution

Check for empty parameter.

Remaining tasks

  1. Update code
  2. Review and test
  3. Commit :)

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024