hi.
after update drupal 11.3.13 to 11.4.0 , This error is displayed in dblog.

Warning: Undefined property: Drupal\Core\Extension\Theme::$origin in fences_requirements() (line 35 of /home/..../public_html/web/modules/contrib/fences/fences.install)

Issue fork fences-3607877

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

bolaghi created an issue. See original summary.

anybody’s picture

Version: 3.0.8 » 3.x-dev
Assigned: Unassigned » grevil
Priority: Major » Normal

I can confirm this in the status report, but it's not major, just a warning.

bolaghi’s picture

Doesn't this error cause problems for the site?

anybody’s picture

No, I don't think so.

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

grevil’s picture

Assigned: grevil » anybody
Status: Active » Needs review

Themes used to be plain "Extension" objects, with dynamic "origin" properties. Since 11.4, themes have their own dedicated class, but unfortunately, they removed the "origin" property. Now, we have to check the origin via path.

But I am unsure, whether there are cases, where the base directory of drupal core is not "core". If so it'll still be a total edge case and only effects the requirements warning.

Also added tests for this. Please review!

grevil’s picture

Great... the test runner still runs on old Drupal 11.3, so it doesn't know about the new class... (hence the tests fail)

grevil’s picture

@anybody, how should we continue here? I don't want to set:

composer:
variables:
DRUPAL_CORE: "10.5.3"

in the gitlab-ci.yml, since we will probably forget it...

anybody’s picture

Assigned: anybody » Unassigned
Status: Needs review » Reviewed & tested by the community

Code LGTM.

grevil’s picture

Title: Warning: Undefined property: Drupal\Core\Extension\Theme::$origin in fences_requirements() » Fix Drupal 11.4 hook_requirements deprecation issues.
Status: Reviewed & tested by the community » Needs work
grevil’s picture

Status: Needs work » Reviewed & tested by the community

Ok we talked internally and will commit as is. The pipeline will succeed again, once the gitlab-ci Drupal version will get updated to 11.4.

  • grevil committed 8a1de949 on 3.x
    fix: #3607877 Fix Drupal 11.4 hook_requirements deprecation issues.
    
grevil’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

anybody’s picture

Confirmed!

Status: Fixed » Closed (fixed)

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