We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38926
    • 33 Posts
    Okay, I managed to solve the last problem with an update file from the github rep, but I'm still seeing some pathing issues.

    Fx in the snippet:

    if (file_exists($file)) {
       $o = include $file;
    } else { $o = 'File not found at: '.$file; }
    
    return $o;


    I'm calling this with

    [[!include? &file=`[[++doodles.core_path]]elements/snippets/snippet.doodles.php`]]


    As per the doodles tutorial, but it doesnt find any files. I've also tried altering the doodles.core_path to just be "/www/" (doing this on my localhost) and have the snippet call a test.php file there, but it doesnt find anything.

    Is modx unable to see the top levels of the folders in the server or something? If I leave the doodles.core_path blank and let modx default to baseurl it finds the test.php just fine if it's in the modx folder, but it's completely unable to see the www directory for some reason.

    Anyone that has any idea what is going on? [ed. note: cruiser last edited this post 14 years, 4 months ago.]
      • 38926
      • 33 Posts
      Okay, I simply figured now that Modx cannot look higher than it's own modx directory, and changed the two settings paths to this:

      doodles.core_path - ../doodles/core/components/doodles/
      doodles.assets_url - ../doodles/assets/components/doodles/

      It seems completely stupid considering the tutorial tells you to write

      doodles.core_path - /www/doodles/core/components/doodles/
      doodles.assets_url - /doodles/assets/components/doodles/

      But hey, now it works. Now it properly finds the files that needs to be included, although I'm not sure if I just "hacked" the tutorial or if this was an intentional, if rather poorly explained, course of action on part of the reader.
        • 34120
        • 236 Posts
        Hi,
        How did you get on with this? I have had to do the same thing with the system settings paths but I'm now hitting problems with the namespace path.

        To get the namespace to work I have to change the system setting to: ../../doodles/core/components/doodles/

        But that then breaks the paths elsewhere.