https://twill.io logo
Join Discord
Powered by
# ❓questions
  • k

    Kirk Bushell

    06/30/2021, 12:10 AM
    Undefined variable $authors (View: /Users/kirkbushell/Work/Mine/rathetimes/vendor/area17/twill/views/partials/form/utils/_blocks_templates.blade.php)
  • k

    Kirk Bushell

    06/30/2021, 12:11 AM
    To give context, I removed that variable days ago, as it's no longer relevant.
  • k

    Kirk Bushell

    06/30/2021, 12:13 AM
    It's like Twill is using an outdated version of my form.blade.php for my articles
  • i

    ifox

    06/30/2021, 12:16 AM
    if that error is coming from that twill internal view, it means it's looking for that variable in one of your blocks views, not the form view.
  • k

    Kirk Bushell

    06/30/2021, 12:27 AM
    The form view is where it originally existed
  • k

    Kirk Bushell

    06/30/2021, 12:28 AM
    @User aha, I see.
  • k

    Kirk Bushell

    06/30/2021, 12:29 AM
    ty, was looking at the form
  • k

    Kirk Bushell

    06/30/2021, 12:30 AM
    So seems the view creator isn't being called
  • k

    Kirk Bushell

    06/30/2021, 12:30 AM
    hmmm
  • k

    Kirk Bushell

    06/30/2021, 12:31 AM
    @User are blocks rendered in some special way?
  • k

    Kirk Bushell

    06/30/2021, 12:32 AM
    my view creators work for all my other views, but not this one.
  • k

    Kirk Bushell

    06/30/2021, 12:32 AM
    View::creator('admin.blocks.contributor', ContributorCreator::class);
  • k

    Kirk Bushell

    06/30/2021, 12:32 AM
    public function create(View $view) { $view->with('authors', $this->authors()); }
  • k

    Kirk Bushell

    06/30/2021, 12:32 AM
    Not being called
  • i

    ifox

    06/30/2021, 12:34 AM
    yeah they are rendered "manually" and don't currently have access to the view creator/composer data. you can however call a service or whatever from the block view itself
  • k

    Kirk Bushell

    06/30/2021, 12:34 AM
    Damn.
  • k

    Kirk Bushell

    06/30/2021, 12:35 AM
    Why is that?
  • k

    Kirk Bushell

    06/30/2021, 12:37 AM
    Right, next question - how do I get a one->many to contributors working here? Need to render existing contributors, which it's not doing.
  • k

    Kirk Bushell

    06/30/2021, 12:39 AM
    Nevermind, found github issue 🙂
  • i

    ifox

    06/30/2021, 12:41 AM
    well because of how it's implemented here https://github.com/area17/twill/blob/8f06ea53928c3f83735b2068efbc13e91ecf5e76/src/Services/Blocks/Block.php#L290
  • k

    Kirk Bushell

    06/30/2021, 12:41 AM
    Geez, just to be able to remove tags? ouch.
  • k

    Kirk Bushell

    06/30/2021, 12:48 AM
    Hmmm, repeaters don't seem to want to work for a has many relation
  • k

    Kirk Bushell

    06/30/2021, 12:49 AM
    ahaa
  • i

    ifox

    06/30/2021, 12:50 AM
    we used to do it without a custom blade compiler for this, and I agree it shouldn't be needed to remove those tags. That was part of @antonioribeiro's work on self contained blocks that we can revisit to support view creators/composers. If you have alternative ideas, that's great.
  • k

    Kirk Bushell

    06/30/2021, 12:51 AM
    got it 😄
  • k

    Kirk Bushell

    06/30/2021, 12:51 AM
    just some very specific naming
  • k

    Kirk Bushell

    06/30/2021, 12:51 AM
    Man I really wish you guys used form field DTOs or something for this
  • k

    Kirk Bushell

    06/30/2021, 12:51 AM
    debugging arrays and values takes me back to wordpress days, not good. lol
  • i

    ifox

    06/30/2021, 12:52 AM
    I think I got it man lol
  • k

    Kirk Bushell

    06/30/2021, 12:52 AM
    It's gotten to the point where I've started building a nova module for content using nova content fields, and mapping it to how you guys have your data structures. lol
1...383940...484Latest