Forum

Thread tagged as: Error, Api

Cannot save posts

Hi hope you're both OK :-D

I'm not sure why, but I can no longer save posts either as draft or as published, I get redirected to this url:

https://deliciousreverie.co.uk/perch/addons/apps/perch_blog/edit/

With the error:

Fatal error: Call to a member function return_instance() on boolean in /Users/BenRead/Sites/deliciousreverie/perch/core/lib/api/PerchAPI_Form.class.php on line 430

I've tried changing down the php version, and replacing the /perch/ folder, but it still seems to be happening.

Here's the basic diagnostic report, let me know if you need the full one:

Perch: 2.8.29, PHP: 5.6.22, MySQL: 5.5.50, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (4.5.4) App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', ); PERCH_LOGINPATH: /perch PERCH_PATH: /home/delicrev/public_html/perch PERCH_CORE: /home/delicrev/public_html/perch/core PERCH_RESFILEPATH: /home/delicrev/public_html/perch/resources Image manipulation: GD Imagick PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M F1: 2edba60ed1f613d6dd804feb202456a2 Resource folder writeable: Yes DOCUMENT_ROOT: /home/delicrev/public_html HTTP_HOST: deliciousreverie.co.uk REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Thanks for your help :-)

Ben PS. This happens on both my local dev version and the hosted.

Ben Read

Ben Read 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We would need to see your post.html template as well.

Thanks Rachel, here you go:

<article>
    <h1>
            <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
    </h1>
    <p class="meta"><small>
        <time datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />">
            <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" />
        </time>
        <perch:if exists="authorGivenName">
            by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span>
        </perch:if>
                in
        <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes">
            <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>

            </small></p>
    <perch:if exists="image">
        <div>
            <img src="<perch:blog id="image" type="image" crop="false" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
        </div>
    </perch:if>
    <div class="description e-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" />
    </div>
        <div class="description e-content">
            <perch:blog id="postIframe" type="text" label="iFrame" order="2" editor="markitup" markdown="true" html="true" size="xxl autowidth" required="false" />
        </div>
</article>

<perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" />
<perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

Your Blog app is out of date - I think you just need to update it.

Ah great, thanks Drew :-)