Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken app extension registration #11231

Closed
caseydwyer opened this issue Dec 7, 2024 · 0 comments · Fixed by #11246
Closed

Broken app extension registration #11231

caseydwyer opened this issue Dec 7, 2024 · 0 comments · Fixed by #11246
Labels

Comments

@caseydwyer
Copy link
Contributor

caseydwyer commented Dec 7, 2024

Bug description

I believe there was a regression in #11046, that broke "standard" extension registration. I would expect this to have broken other file types inside the App/* directories, but have confirmed it on Dictionaries. Specifically, see this commit.

When reverting that code (ie, before that PR was merged), DD'ing the $fqcn inside registerAppExtensions yields something valid and expected, like:

App\Dictionaries\SpecialMap

But with that PR, it breaks the fully-qualified name and returns an invalid path:

App\C:\www\my-website\app\Dictionaries\SpecialMap

How to reproduce

  1. Install latest Statamic
  2. Setup a Dictionary (or presumably any of the standard extension classes)
  3. Append the field as a config on any fieldtype:
Text::appendConfigFields([
    'external_field' => [
        'type' => 'dictionary',
        'dictionary' => 'special_map',
        'instructions' => 'Corresponding field, as labeled on the associated object.',
        'max_items' => 1,
    ],
]);
  1. Try to open a blueprint field of that type, inspect request for error (exception thrown in DictionaryFields.php around line 57)

Logs

No response

Environment

Environment
Application Name: My Website
Laravel Version: 11.34.2
PHP Version: 8.2.5
Composer Version: 2.5.8
Environment: local
Debug Mode: ENABLED
URL: my-website.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: null
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Livewire
Livewire: v3.5.17

Statamic
Addons: 6
Sites: 3 (One, Tow, Three)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.42.0 PRO

Statamic Addons
caseydwyer/statamic-long-range: dev-main
eminos/statamic-tabs: 1.2.0
jacksleight/statamic-miniset: 1.2.0
jonassiewertsen/statamic-livewire: 3.8.1
statamic-rad-pack/runway: 7.13.1
statamic/seo-pro: 6.4.0

Installation

Fresh statamic/statamic site via CLI

Additional details

On Windows 10, using Herd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants