https://twill.io logo
Join Discord
Powered by
# 🔬internals
  • i

    ifox

    11/22/2022, 12:55 PM
    Are we talking about self nested or parent-child?
  • k

    kalle

    11/22/2022, 12:55 PM
    parent child this is
  • i

    ifox

    11/22/2022, 12:55 PM
    In self nested, we have
    showOnlyParentItemsInBrowsers
  • i

    ifox

    11/22/2022, 12:55 PM
    Ok
  • i

    ifox

    11/22/2022, 1:01 PM
    I think we've been using the
    adminEditUrl
    accessor on the model manually for this use case
  • k

    kalle

    11/22/2022, 2:10 PM
    How would that fix this? 😄
  • i

    ifox

    11/22/2022, 3:49 PM
    https://github.com/area17/twill/blob/d45b355af16b31fc192df5db10c382acc0c7b128/src/Repositories/Behaviors/HandleBrowsers.php#L183
  • i

    ifox

    11/22/2022, 3:49 PM
    it wouldn't in your case, my bad
  • k

    kalle

    11/23/2022, 9:27 AM
    Managed to fix JSON browser data to generate, but now CMS returns 404 for that route, I mean wtf 😄
  • k

    kalle

    11/23/2022, 11:50 AM
    Seriously, why is thing happening. If I override
    browser
    method or directly manipulate returned data with something else then
    Response::json
    endpoint is reached and data is returned on GET request. But if response is returned via
    Response
    facade, CMS gives 404 on that route. Any idea?
  • i

    ifox

    11/23/2022, 11:54 AM
    what do you mean by response facade?
  • k

    kalle

    11/23/2022, 11:58 AM
    Lost too much time on this, gonna implement alternative sadly.
  • i

    ifox

    11/23/2022, 12:01 PM
    you said: if response is return via response facade, CMS gives 404
  • i

    ifox

    11/23/2022, 12:01 PM
    do you mean another method than ::json?
  • k

    kalle

    11/23/2022, 12:20 PM
    I fixed it, but not so great solution. Manualy override of all browser feature methods and concat all to make a JSON response.
  • k

    kalle

    11/23/2022, 9:08 PM
    Finaly made it to work as it is, but definetly something from L9 is causing this, since this project was on L8 few days ago. 😄
  • s

    savchuk.ivan

    12/22/2022, 6:04 PM
    Good afternoon! Previously, a question was asked about field validation in this order: blocks->repeaters->field. I found a way to validate such fields, but there is a problem with displaying error messages. How is the output of errors organized under the field (which has a red color)?
    Copy code
    class TestRequest extends Request
    {
        public function rulesForCreate()
        {
            return [];
        }
    
        public function rulesForUpdate()
        {
            return $this->rulesForTranslatedFields([
                'blocks.*.blocks.repeater_main_banner.*.content.color' => ['required'],
                'blocks.*.blocks.repeater_main_banner.*.medias.image'=> ['required']
            ], [
    
            ]);
    
        }
    }
  • h

    Harings Rob

    01/10/2023, 8:24 AM
    hey @BA7YA Could you test https://github.com/area17/twill/pull/2047 for fixing your issue https://github.com/area17/twill/issues/1957 ?
  • h

    Harings Rob

    01/10/2023, 8:24 AM
    You can use https://github.com/cweagans/composer-patches with https://github.com/area17/twill/pull/2047.patch
  • v

    VadimG

    01/10/2023, 10:50 AM
    @Harings Rob Nice solution with deleting fields' values , thank you!
  • h

    Harings Rob

    01/10/2023, 10:51 AM
    It works? 😄
  • v

    VadimG

    01/10/2023, 10:55 AM
    By the code - seems yes, but need to update the app and check:)
  • b

    BA7YA

    01/11/2023, 10:48 AM
    Hi! Thank you very much! It's working!
  • i

    ifox

    01/11/2023, 10:48 AM
    awesome!
  • h

    Harings Rob

    01/11/2023, 10:49 AM
    nice, will tag a new 2.x version today as well
  • b

    BA7YA

    01/12/2023, 8:29 AM
    I found one bug with fix in frontend/js/components/ConnectorField.vue file. After this fix , second level of condition fields are not working . For example : 1) I have I select with colors (blue, white, black) 2) Below I have checkbox which will show up when selected color is white 3) Below checkbox I have input which will show up when checkbox above is true After fix it's stopped working, like if you will tick checkbox to true and then select different color, input still shown and not hidden
  • h

    Harings Rob

    01/12/2023, 8:33 AM
    I am curious if this was ever supposed to work, might have been an side effect of the regression we fixed 😄
  • h

    Harings Rob

    01/12/2023, 8:33 AM
    you are putting connected fields inside another right?
  • b

    BA7YA

    01/12/2023, 10:12 AM
    Right!)
  • h

    Harings Rob

    01/13/2023, 12:44 PM
    @BA7YA https://github.com/area17/twill/compare/backport-connected-field-fix?expand=1 this should fix it