We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38713
    • 91 Posts
    Hi guys,

    Can someone help my little brain. I seem to be having a moment.

    I have created a custom package for testimonials with MIGXdb and that's fine and is all working.
    However when I try to include the package in the snippet with $modx->addPackage it's failing for some reason

    As far as I can see everything is ok.
    Here is the code grabbing the package:
    <?php
    $path = MODX_CORE_PATH . 'components/testimonials/';
    $result = $modx->addPackage('testimonials', $path . 'model/');
    
    if (!$resut) {
        return 'Failed to add package';
    } else {
        $o = '';
    }
    
    and so on
    


    my package is at core/components/testimonials/
    within here I have:
    model/schema
    model/testimonials

    So it all seems as it should to me but somethings obviously awry.

    Any help would be amazing ta!!
      Twitter @alexmercenary
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      You seemed to have mistyped $result in the check (line 5)... unless this is not the full code you're using?
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 38713
        • 91 Posts
        Hahahahaha!! I feel like a bloody idiot now.
        That'll teach me to read properly. I could have sworn I scanned over that so many times.

        Thanks Mr Hamstra!
          Twitter @alexmercenary