nova-inline-relationship icon indicating copy to clipboard operation
nova-inline-relationship copied to clipboard

Issue with Media Library

Open drexelroth opened this issue 5 years ago • 8 comments

We have this package setup with ebess/advanced-nova-media-library and it does not save images when creating or updating a record. Any ideas regarding what would cause this? Is anyone else using this successfully with this media library.

drexelroth avatar Nov 13 '19 20:11 drexelroth

Hi @drexelroth! Thanks for the feedback on this issue. We've been busy but are hoping to carve some time out soon.

If you've already put in the work we would appreciate your contribution–via pull request or even just a description of your solution.

Thanks again!

michaelfox avatar Nov 26 '19 17:11 michaelfox

@drexelroth My hunch is that ebess/advanced-nova-media-library uses custom fields which our package is incapable of using properly. Have you been able to make any progress on this?

brandonferens avatar Dec 05 '19 14:12 brandonferens

Hi

"kirschbaum-development/nova-inline-relationship": "^0.2.0",

I'd like to try my hand at making ebess/advanced-nova-media-library work. I am having trouble publishing the configs.

I ran:

php artisan vendor:publish

but could not find any providers/tags relating to KirschbaumDevelopment.

I also tried:

php artisan vendor:publish --provider=NovaInlineRelationshipServiceProvider

which published nothing.

Is there something I'm doing wrong?

Thanks Ashley

AshleyMinshall avatar Jan 30 '20 13:01 AshleyMinshall

@AshleyMinshall you should be able to publish it via:

php artisan vendor:publish --provider=KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationshipServiceProvider

I am very curious to see how you will tackle this. It would be really great to be able to use this media package! Thanks

brandonferens avatar Jan 31 '20 14:01 brandonferens

Hi @brandonferens

So I discovered that the version of nova-inline-relationships (0.2.0) is not the same as this repo's code. So now I'm pulling in the master code through vcs in composer.

I ran:

php artisan vendor:publish --provider=KirschbaumDevelopment\NovaInlineRelationship\NovaInlineRelationshipServiceProvider

but unfortunately it did nothing, so I copied the config file config/config.php => ./config/nova-inline-relationships.php. I added my own ThirdParty directory and this is what it looks like:

<?php

return [
    'third-party' => [
        'KirschbaumDevelopment\NovaInlineRelationship\Integrations',
        'App\Nova\ThirdPartyIntegrations',
    ],
];

So Far so good.

I then created my integration class:

<?php

namespace App\Nova\ThirdPartyIntegrations;

use KirschbaumDevelopment\NovaInlineRelationship\Integrations\ThirdParty;
use KirschbaumDevelopment\NovaInlineRelationship\Integrations\Contracts\ThirdPartyContract;

class Images extends ThirdParty implements ThirdPartyContract
{
    /**
     * Fields array from object.
     *
     * @return array
     */
    public function fields(): array
    {
        dd($this);
        // The following is just an example and should be updated to meet your needs.
        return $this->field->customFieldArray;
    }
}

However this is where I got stuck. Note the dd(), I couldn't see where it was called and I think calling customFieldArray would cause laravel to bomb anyway.

I think my new class is not being registered/called.

Thanks for the assistance Ashley

AshleyMinshall avatar Feb 04 '20 17:02 AshleyMinshall

@AshleyMinshall Thank you so much for looking into this. I will spend a little time today testing your code above and let you know if I find anything that isn't right. I will also have to look into why the config isn't publishing.

brandonferens avatar Feb 05 '20 14:02 brandonferens

Hi @brandonferens

Is there any movement on this issue?

When I upgraded to dev-master in my composer, I could no longer create/update my relationship however, viewing worked if I added the records manually.

Is it possible that this issue is related to https://github.com/kirschbaum-development/nova-inline-relationship/issues/54? The reason why I moved to Media Library was that the default Image field was not working.

My Client has changed their expectations for the feature I was working on and it requires a more custom solution. Therefore I probably won't be using nova or this package for this.

Good luck Ashley M

AshleyMinshall avatar Feb 20 '20 14:02 AshleyMinshall

Any update on this?

I tried many combinations of vendor:publish, but it doesn't create the config file. I then created the config file manually and followed the documentation, but I still get the error when using Images field.

riptin avatar May 19 '23 15:05 riptin