Posts by Darryl Hein

    Hmmm, that doesn't seem to be working. I have an Image content field on a page, but when I replace the asset in Assets, the image is still the same on the page and in the Perch admin. The new image has been added to the Assets. I can select the new image in the content field, but it's still the original file.


    PHP
    1. Perch Runway: 3.1.4, PHP: 7.3.2
    2. Installed apps: content (3.1.4), assets (3.1.4), categories (3.1.4), perch_blog (5.6.1), perch_forms (1.12), perch_twitter (4.0)
    3. App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', 'perch_twitter', );

    It seems when I open an asset in the assets section and then choose a new file under "Replace file", the replacement file is actually added as a new file. Is this intended behaviour?


    I understand the use case of CDNs or caching, but the field label has confused a few of my customers as it doesn't replace the file, but creates a second one and the user is forced to select the new file (possibly in multiple locations).

    Hi Ian,


    The blog app is still installed.


    The process would be:

    1. Install blog app
    2. Add 1 blog
    3. Add post(s)
    4. Add second blog (under "Blogs")
    5. Add post in second blog
    6. Delete second blog (under "Blogs")

    The result is that the post added in step 5 are still available (not deleted or blocked/hidden). Also, if you list all blog entries without specifying a blog, the posts from the deleted blog will be included.


    I didn't try this, but my assumption would be that if the blog app is deleted (either just the app config item or the app files as well), the blog won't work at all because none of the `perch_blog...` functions wouldn't be available and thus the blog (or blogs) wouldn't work at all. But, I could be wrong. Definitely something to test if you're removing all blogs.

    I'm having a weird issue – it's generating error log messages, but it appears that the admin is working fine.


    The error is:


    Code
    1. "Call to a member function userGivenName() on null" at [...]perch/core/runway/apps/content/async/get-lock.php line 39

    It appears to occur when I save a piece of content, for example at the URL:

    Code
    1. /perch/core/apps/content/edit/?id=12"

    I'm using a custom auth plugin. Looking in the content_locks table, the userID is 0.


    The immediate trace is:


    Code
    1. "[...]perch/core/lib/api/PerchAPI_AuthPlugin.class.php:69",
    2. "[...]perch/core/lib/PerchUsers.class.php:32",
    3. "[...]perch/core/inc/auth_light.php:14",
    4. "[...]perch/core/runway/apps/content/async/get-lock.php:6"

    My resume_session method returns an array (as per the docs https://docs.grabaperch.com/api/auth/) with keys email and role.


    As far as I can tell, if it can't get a lock, then it's looking for a PerchUser object which (obviously) it doesn't have.


    Am I doing something wrong?