FlusherDock1 / EditorJS

Formwidget plugin for October CMS
https://octobercms.com/plugin/reazzon-editor
MIT License
24 stars 12 forks source link

Attach files and images doesn't works due to incompatibility with Laravel 6 #30

Closed faselunare closed 2 years ago

faselunare commented 2 years ago

Describe the bug Upload and attach images and files doesn't works (error 500) if the plugin is installed in WinterCMS 1.2

To Reproduce Steps to reproduce the behavior:

  1. Try to attach an image or a file
  2. In the browser Console you get ERROR 500

Screenshots error500

Solution In file plugins/reazzon/editor/classes/plugins/attaches/resource/AttachResource.php change

this use Illuminate\Http\Resources\Json\Resource; to use Illuminate\Http\Resources\Json\JsonResource;

and this class AttachResource extends Resource to this class AttachResource extends JsonResource

and

In file plugins/reazzon/editor/classes/plugins/image/resource/ImageResource.php change

this use Illuminate\Http\Resources\Json\Resource; to use Illuminate\Http\Resources\Json\JsonResource;

and this class ImageResource extends Resource to this class ImageResource extends JsonResource

FlusherDock1 commented 2 years ago

Thanks for notice! Fixed in dc48fdc