Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Unable to add images in post

  • #5616
    Avatar photo[anonymous]

    Hello Friends,

    Please help!

    I am unable to add images in my posts. I have around 80 posts. Using paid editorial theme.
    I have a two user setup on another computer with dropbox. I have updated publii to 0.38.1 on both computers.

    it keeps stuck on loading after i select an image from browsing in my computer.

    Also I get this error when i try to save the post – however i do get the post saved notification.

    ——–

    8 A JavaScript error occurred in the main process

    Uncaught Exception:
    SyntaxError. Unexpected token }n JSON at position 1222,

    (CAUsers\Madhur\AppData\Local\Programs\Publil\resources\app.asar\back-end\postj..:14)
    at IpcMainimpl.<anonymous>
    (CAUsers\Madhur\AppData\Local\Programs\Publil\resources\app.asar\back-end\event..:31)
    at IpcMainimpl.emit (events,s:315:20)
    at IpcMainimpl.EventEmitter.emit (domain s:483:12)
    at Object.<anonymous> (electron/js2c/browser_initjs:157:9051)
    at Object.emit (eventsjs:315:20)
    ‘at Object.EventEmitter.emit (domainjs483:12)

    ——————–

    Things I have tried:

    1. I have tried using png and jpg.
    2. backup my site. install publii on a different windows user and then restore the back up. – doesnt work
    #5629
    Avatar photo[anonymous]

    Hi,

    Please try to go to the App Settings and change the image resize engine from “sharp” to “jimp” and then please check again.

    #5631
    Avatar photo[anonymous]
    Tomasz Dziuda wrote:

    Hi,

    Please try to go to the App Settings and change the image resize engine from “sharp” to “jimp” and then please check again.

    Hello Tomasz,

    Thanks for the reply. I tried it but it didnt solve it.

    1. tried added image in gallery mode – its stuck on  ‘loading’
    2. tried to add a single image – it’s not taking any ‘source’
    3. when i exit the post, i get the attached error.
    #5634
    Avatar photo[anonymous]

    Other things I have tried:

    1. opening the ‘site’ backup in version 0.37.3 (the last one on downloads page)
    2. resetting all the theme settings by cloning the site

    but the same problem continues.

    Also this error only happens with this particular ‘site’ project. all the other test ‘sites’  in publii are working alright. I am using theme override for custom css.

    So my guess is the problem is somewhere in the files of this particular site.

    Is there some way I can create a new site and import all the posts there? the site backup option doesnt work.

    #5635
    Avatar photo[anonymous]

    Could you provide me a config.json file from your theme? Maybe there is a problem

    #5639
    Avatar photo[anonymous]

    Hello

    Thanks. Will the attached file work?

    5640 is from “inputthemeseditorial-override”

    config

    #5659
    Avatar photo[anonymous]

    It seems that this file is correct. It must be something wrong in one of the JSON files of your website.

    Could you share with me a backup of your website? I suppose that it can be caused by manual changes in the files.

    #5660
    Avatar photo[anonymous]
    This reply has been marked as private.
    #5678
    Avatar photo[anonymous]

    Hello Tomasz,

    How do you wish for me to share the project backup with you?

    #5714
    Avatar photo[anonymous]

    Hello Tomasz!

    I was able to fix the error. Thanks for the hint! It was an extra in one of the json files. Damn! Thankfully I found it.

    I wasnt using git with publii files. Lesson learnt!

    First thing now i did was setup the git.

    thank you and good luck!