Skip to content

Nova 4 compatibility fix#315

Closed
oleghalin wants to merge 1 commit intoebess:masterfrom
oleghalin:nova4-fix
Closed

Nova 4 compatibility fix#315
oleghalin wants to merge 1 commit intoebess:masterfrom
oleghalin:nova4-fix

Conversation

@oleghalin
Copy link
Copy Markdown
Contributor

Vue 3 compatibility for components
Deleted cropping and draggable (no vue 3 version)
Deleted laravel-nova dependency
Updated webpack.mix.js
Production build

Deleted cropping and draggable (no vue 3 version)
Deleted laravel-nova dependency
Updated webpack.mix.js
Production build
@profd2004
Copy link
Copy Markdown

This awesome pr works when viewing a resource. When editing a resource I'm now getting this:
runtime-core.esm-bundler.js:226 ReferenceError: _ is not defined at Proxy.data (media-lib-images-field:2:64759) at Vr (runtime-core.esm-bundler.js:2791:34) at Vi (runtime-core.esm-bundler.js:7159:9) at runtime-core.esm-bundler.js:7071:9 at Ui (runtime-core.esm-bundler.js:7001:11) at j (runtime-core.esm-bundler.js:4922:13) at N (runtime-core.esm-bundler.js:4897:17) at g (runtime-core.esm-bundler.js:4489:21) at E (runtime-core.esm-bundler.js:4685:13) at C (runtime-core.esm-bundler.js:4594:17)

This error is preventing any fields from loading on the edit screen.

Step to to reproduce:

  1. override "ebess/advanced-nova-media-library": "dev-nova4-fix as 3.8.2"
  2. php artisan vendor:publish --tag=nova-assets --force
  3. php artisan vendor:publish --tag=nova-lang --force
  4. php artisan view:clear
  5. Edit a resource with an image on it.

@oleghalin
Copy link
Copy Markdown
Contributor Author

@profd2004 just tested it.

Make sure that you have correct Nova installation

@profd2004
Copy link
Copy Markdown

I have v4.2.1 (Silver Surfer).

@oleghalin
Copy link
Copy Markdown
Contributor Author

@profd2004 can you show me your Images field code?

@profd2004
Copy link
Copy Markdown

   use Ebess\AdvancedNovaMediaLibrary\Fields\Images;

    public function fields(Request $request)
    {
        return [
          ....
          new Panel('Media', self::mediaFields()),
       ]
    }

    ....
    public static function mediaFields(): array
    {
        return [
            ...
            Images::make(__('Hero'), 'hero')
                ->enableExistingMedia(),
        ];
    }

@oleghalin
Copy link
Copy Markdown
Contributor Author

@profd2004 sorry was unable to check feature for existing media. Try to use it without it

@mucenica-bogdan
Copy link
Copy Markdown
Contributor

@oleghalin FYI: I've been working during the weekend on a nova4 update as well: see #317

I managed to find alternatives for cropping and draggable libs, and also @profd2004 I got the existing media modal to work as well.

@mucenica-bogdan mucenica-bogdan mentioned this pull request Apr 20, 2022
10 tasks
@bkintanar
Copy link
Copy Markdown
Collaborator

Closing this in favor of #317

@bkintanar bkintanar closed this Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants