• Resolved sdkjambo

    (@sdkjambo)


    I’m trying to locate the function load_cpt_from_id which is flooding my error log. Is it coming from the CPT UI plugin and if not, any idea where or how to resolve?

    Sample error, ID number varies:
    “load_cpt_from_id didn’t find ID=12345”

    PHP, WP core, Total theme, WPBakery and CPT UI plugin all up to date. Searched all .php files on the site. No visual errors on website.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Good day and Happy Friday,

    That is not a function we have in CPTUI, so I’m not sure what’s providing it. I did a quick search for that function name and came across this thread and reply over on GeneratePress, though GeneratePress support is saying it’s not from them either. Regardless, your error above matches up with the thread starter’s error log, so you both have something in common.

    https://generatepress.com/forums/topic/decor-theme-installation-stops-at-importing-content/#post-1951783

    Not sure how tech savvy you may be, but one of my tricks with code searching is using command line tools like grep or https://github.com/ggreer/the_silver_searcher to quickly search through codebases. Very handy when you do something like ag "on some_function_name" to quickly find where functions are defined at.

    Hopefully I’m not stepping on too many toes with this, and I hope you’re able to find the function source.

    Thread Starter sdkjambo

    (@sdkjambo)

    Cheers for your help, Michael, thanks for checking and I appreciate the suggestions, yep I saw that GeneratePress thread. Happy Weekend!

    Thread Starter sdkjambo

    (@sdkjambo)

    Resolving thread now

    Thread Starter sdkjambo

    (@sdkjambo)

    Found it – for reference the source was the “MemberPress Courses” plugin, in BaseCptModel.php there’s evidently something on the developers’ to-do list!

    // TODO: Should we do this or throw an error?
    //$this->initialize_new_cpt();
    error_log(‘load_cpt_from_id didn\’t find ID=’.$id);

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Glad you were able to find it. Looks like it’s not actually a function but just part of an error message. Fun times.

    @sdkjambo thanks for checking back with your findings. I was having the same issue.

    Thread Starter sdkjambo

    (@sdkjambo)

    No problem, happy to help

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘load_cpt_from_id’ is closed to new replies.