Pipits Inline Perch Assets problem

  • Good afternoon,


    I'd love to use the Pipits Inline Perch Assets on a new site I'm working on but I can't seem to get it to work. I have custom Redactor plugins loading and working fine but adding the Inline Assets plugin doesn't seem to work. I can get the icon to appear but adding an image simply adds a blank line within Redactor and no image.


    In the console I end up with Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern after trying to add an image using the plugin (using Safari, Big Sur).


    My Redactor config.js code is below and I'm on the latest version of Perch Runway:


    Would love it if Hussein is around and can shed any light on what might be wrong.


    Thanks, Lea.

  • Thanks Hussein - some answers for you:

    • I tested in Chrome as I thought that could be the case and I received a similar error message but referencing JSON. I can dig this out if it helps?
    • Seems to be for new or existing assets
    • I added your example config just to check this and still had the same result

    I'll try this out on our staging server tomorrow to see if I can find any more information.


    Thanks for getting back to me.

  • Hi Hussein,


    I've cracked it - as you mentioned, as usual Chrome has the key. So - the console error lead me to a 404 with this require path require (realpath(__DIR__ . '/../../../..//') . '/core/runtime/runtime.php'); inside 'get_asset.php'. I've changed that line to read:


    require ($_SERVER['DOCUMENT_ROOT'].'/admin/core/runtime/runtime.php');


    Inline assets are now working a treat :)


    Thanks for giving me a nudge in the right direction.


    Thanks, Lea.