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

Extensions: Changing name of an entry on a bundle it's not reflected #21942

Closed
joselcvarela opened this issue Mar 21, 2024 · 2 comments · Fixed by #22013
Closed

Extensions: Changing name of an entry on a bundle it's not reflected #21942

joselcvarela opened this issue Mar 21, 2024 · 2 comments · Fixed by #22013

Comments

@joselcvarela
Copy link
Member

Describe the Bug

While working with a bundle extension, I have tried to change the name of an endpoint.
I have done this by change the name of the entry in the package.json.
As result I was expecting to access the custom endpoint with the new name, but it was only accessible using the old name.

To Reproduce

  • Create a folder
  • Run npx create-directus-extension@latest and choose bundle
  • Enter newly created folder
  • Run npm run add and choose endpoint with name "lorem"
  • Access /lorem and you should see "Hello, World!"
  • Copy files to extensions folder
  • Edit package.json and change name "lorem" to "ipsum"
  • Restart Directus
  • Access /ipsum and it will send 404. Access /lorem and you should see "Hello, World!"

Directus Version

10.10.4 (main)

Hosting Strategy

Self-Hosted (Custom)

@Ventinc
Copy link

Ventinc commented Mar 21, 2024

Hello, I had a similar problem an hour ago, I think it's because of all the things that has been changed in extension loader and the database for marketplace. I could create an endpoint extension in my bundle extension but it was never added to the list of enabled extension. The only solution I had was to delete everything in the directus_extensions table and then stop and restart directus to reload all extensions

@joselcvarela
Copy link
Member Author

Yes, it looks like once the extensions/entries are added to database, they are not being updated again 🤔

hanneskuettner added a commit to hanneskuettner/directus that referenced this issue Mar 28, 2024
@hanneskuettner hanneskuettner self-assigned this Apr 19, 2024
br41nslug added a commit that referenced this issue May 7, 2024
* Fix bundle (re-)loading (fixes #21942 and #21946)

* Add changeset

* Use .some instead of .find for checking existance

* Fix names

* Cleanup

* Add comments

* Update changeset

* moved out type check

* Clearer params, fix bundle check

* Use enabled state from parent

* Clarify changeset

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Brainslug <tim@brainslug.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants