Skip to content

Error creating term in a multi-site when taxonomy has sites in different order than default #11733

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

Open
edalzell opened this issue Apr 24, 2025 · 0 comments · May be fixed by #11746
Open

Error creating term in a multi-site when taxonomy has sites in different order than default #11733

edalzell opened this issue Apr 24, 2025 · 0 comments · May be fixed by #11746

Comments

@edalzell
Copy link
Contributor

Bug description

In a multi-site, tried to create a taxonomy term.

How to reproduce

  1. Create a site
  2. Make it multi-site, giving the second site the handle second
  3. Create a taxonomy and assign to both sites but make sure second is the first one listed.
  4. Make sure you're in the default (first) site
  5. try to create a Categories term.

Logs

[2025-04-24 17:53:14] local.ERROR: Call to a member function all() on null {"userId":"d443f122-c7bc-474b-bdea-cc5ca52024b4","exception":"[object] (Error(code: 0): Call to a member function all() on null at /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Taxonomies/Term.php:113)
[stacktrace]
#0 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Data/ExistsAsFile.php(45): Statamic\\Taxonomies\\Term->fileData()
#1 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Data/ExistsAsFile.php(94): Statamic\\Taxonomies\\Term->fileContents()
#2 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Stache/Stores/BasicStore.php(142): Statamic\\Taxonomies\\Term->writeFile()
#3 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Stache/Stores/TaxonomyTermsStore.php(196): Statamic\\Stache\\Stores\\BasicStore->writeItemToDisk(Object(Statamic\\Taxonomies\\Term))
#4 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Stache/Repositories/TermRepository.php(127): Statamic\\Stache\\Stores\\TaxonomyTermsStore->save(Object(Statamic\\Taxonomies\\Term))
#5 /Users/erin/Sites/multi-term/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(361): Statamic\\Stache\\Repositories\\TermRepository->save(Object(Statamic\\Taxonomies\\Term))
#6 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Taxonomies/Term.php(224): Illuminate\\Support\\Facades\\Facade::__callStatic('save', Array)
#7 /Users/erin/Sites/multi-term/vendor/statamic/cms/src/Taxonomies/LocalizedTerm.php(439): Statamic\\Taxonomies\\Term->save()

Environment

Environment
Application Name: Statamic
Laravel Version: 12.10.2
PHP Version: 8.3.20
Composer Version: 2.8.6
Environment: local
Debug Mode: ENABLED
URL: multi-term.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

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

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
Sites: 2 (First, Second)
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.53.1 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

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

Successfully merging a pull request may close this issue.

2 participants