statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 73 forks source link

Blueprint visibility inside a Taxonomy blueprint cannot be changed #159

Closed benammiswift closed 1 year ago

benammiswift commented 1 year ago

Bug description

When creating a taxonomy, I created a blueprint as the only blueprint for this taxonomy and accidentally set the "Hidden" slider, which hides the BP from the create buttons in the CP, to enabled. Hiding the Blueprint.

This caused me to be unable to create a new taxonomy term.

On realising my error, I attempted to change the "Hidden" slider on the BP back to disabled but every time time I saved and went back to the taxonomy there was no change and upon editting the BP again, the slider was re-enabled hiding the BP.

There was no error messages when saving and Statamic gave the regular "Saved!" popup when saving.

How to reproduce

Logs

No response

Environment

Environment
Application Name: FPS
Laravel Version: 9.52.8
PHP Version: 8.1.18
Composer Version: 2.6-dev+595559f68d8c01715a2be33a54247898f9fbc34e
Environment: local
Debug Mode: ENABLED
URL: localhost
Maintenance Mode: OFF

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

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

Statamic
Addons: 3
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.2.0 PRO

Statamic Addons
alt-design/o-cart: dev-benammi
jonassiewertsen/statamic-livewire: 2.12.0
statamic/eloquent-driver: 2.0.0

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

duncanmcclean commented 1 year ago

Hmm, I seem to be unable to reproduce this myself on the latest version.

Are you able to update to the latest version (v4.5.0) in case something's fixed it? I can't see anything in the changelog related to it but worth trying 🤷‍♂️

jasonvarga commented 1 year ago

This looks like an issue when you save your blueprints using the eloquent driver. I'll move this issue to that repo.

ryanmitchell commented 1 year ago

I've added a pull request here that should resolve this. Do you want to give it a try?

benammiswift commented 1 year ago

Hey, sorry for not noting that my site is using a database and therefore Eloquent. I forgot that wasn't the usual setup, sorry for the time that's cost you.

I'll pull in the changes in Ryan's PR and see if that fixes it for me