mohamedsabil83 / filament-forms-tinyeditor

A TinyMce Editor component for filament
MIT License
164 stars 37 forks source link

[Bug]: Problem with loading the tinymce.min.js asset #64

Closed poldixd closed 1 year ago

poldixd commented 1 year ago

What happened?

Filament should load the tinymce.min.js asset. But I'm getting a 404 error.

Bildschirm­foto 2023-03-23 um 21 08 20

How to reproduce the bug

When you install your plugin in filament and you go to the page where the editor is included.

Package Version

1.7.1

PHP Version

8.2.4

Laravel Version

10.4.1

Which operating systems does with happen with?

macOS

Notes

Maybe the error is here: https://github.com/mohamedsabil83/filament-forms-tinyeditor/blob/main/src/FilamentFormsTinyeditorServiceProvider.php#L45

If you change the path to…

'filament-forms-tinyeditor' => asset('vendor/mohamedsabil83/filament-forms-tinyeditor/resources/dist/tinymce/tinymce.min.js'),

… filament will find the right asset file and send it to the browser. In this function filament checks if the asset file exists in the composers vendor directory. If the file is not exists, filament will throw a 404.

nguyentranchung commented 1 year ago

Next, publish the asset by run the following:

php artisan vendor:publish --tag="filament-forms-tinyeditor-assets"

poldixd commented 1 year ago

Sorry, I forgot to write: the assets have been published.

mohamedsabil83 commented 1 year ago

Do you make any changes to how filament generate assets URL?

mohamedsabil83 commented 1 year ago

Close for not activity. If you still facing this issue, will open it again.