• Resolved joedsileo1988

    (@joedsileo1988)


    Fresh Install of AI-SEO KISS Version 0.1.4
    Fresh Install of Version 1.9.87
    The error occurs on this admin page: wp-admin/admin.php?page=seokiss_settings

    Procedure: When I click “Magic Fix” next to a post, I get the following errors in consoles.
    “Failed to load resource: the server responded with a status of 500 () /wp-json/seo-kiss/v1/ai_magic_fix:1”
    “An error occured while getting the options.”

    When I dig deeper in the error I see this:
    Could not load content for webpack://seo-kiss/app/js/components/tabs/PostsTab.js (Fetch through target failed: Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

    I investigated the php error log (below) and found the file and line in question. /var/www/example/wp-content/plugins/seo-kiss/classes/modules/ai_suggestion.php line 55

    I set this up on another website and that site did not error out when the keywords were not present.

    I discovered that line was responsible for keywords. If there are no keywords entered Magic Fix errors out. If I manually add Keywords it works. Yet on the working site, it works whether I add keywords or not.

    Both are on WordPress 6.3.1

    OS on the working server Ubuntu 20.04.6
    OS on the broken server Ubuntu 22.04.3

    PHP on the working server is 7.4.
    PHP on the broken server is 8.1

    Apache on the working server is 2.4.41.
    Apache on broken server: 2.4.52

    One server is behind a cloudflare proxy. I turned it off temporarily for testing, confirmed the proxy was off by checking the difference in SSL certs, and it had no effect.

    The Title and Except Magic Wands work just fine on both sites here: wp-admin/edit.php
    So this means there are cases where the keywords do not have to be there.

    I have turned off all plugins except AI Engine and AI-SEO KISS. It had No Effect.

    PHP Log Error: (Changed site to example.org on purpose for public log)

    [Tue Oct 10 12:33:25.199585 2023] [php:notice] [pid 891445] [client 172.70.34.9:13710] [SEO_KISS_MAGIC_FIX] Elapsed time : 0.00 seconds. Now processing : title_seo_length, referer: https://example.org/wp-admin/admin.php?page=seokiss_settings
    [Tue Oct 10 12:33:25.200276 2023] [php:error] [pid 891445] [client 172.70.34.9:13710] PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /var/www/example/wp-content/plugins/seo-kiss/classes/modules/ai_suggestion.php:55\nStack trace:\n#0 /var/www/example/wp-content/plugins/seo-kiss/classes/modules/ai_suggestion.php(55): implode()\n#1 /var/www/example/wp-content/plugins/seo-kiss/classes/modules/magic_fix.php(89): Meow_Modules_SeoKiss_Ai_Suggestion::prompt()\n#2 /var/www/example/wp-content/plugins/seo-kiss/classes/core.php(491): Meow_Modules_SeoKiss_Magic_Fix->magic_fix_title_seo()\n#3 /var/www/example/wp-content/plugins/seo-kiss/classes/rest.php(384): Meow_SeoKissCore->magic_fix()\n#4 /var/www/example/wp-includes/rest-api/class-wp-rest-server.php(1188): Meow_SeoKissRest->rest_ai_magic_fix()\n#5 /var/www/example/wp-includes/rest-api/class-wp-rest-server.php(1035): WP_REST_Server->respond_to_request()\n#6 /var/www/example/wp-includes/rest-api/class-wp-rest-server.php(447): WP_REST_Server->dispatch()\n#7 /var/www/example/wp-includes/rest-api.php(418): WP_REST_Server->serve_request()\n#8 /var/www/example/wp-includes/class-wp-hook.php(310): rest_api_loaded()\n#9 /var/www/example/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()\n#10 /var/www/example/wp-includes/plugin.php(565): WP_Hook->do_action()\n#11 /var/www/example/wp-includes/class-wp.php(398): do_action_ref_array()\n#12 /var/www/example/wp-includes/class-wp.php(779): WP->parse_request()\n#13 /var/www/example/wp-includes/functions.php(1335): WP->main()\n#14 /var/www/example/wp-blog-header.php(16): wp()\n#15 /var/www/example/index.php(17): require(‘…’)\n#16 {main}\n thrown in /var/www/example/wp-content/plugins/seo-kiss/classes/modules/ai_suggestion.php on line 55, referer: https://example.org/wp-admin/admin.php?page=seokiss_settings



Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter joedsileo1988

    (@joedsileo1988)

    Implemented my own fix. (In Bold)

            if ( $ai_keywords ) {

                $keywords = get_post_meta( $post->ID, ‘_seo_kiss_ai_keywords’, true );

    ? ? ? ? ? ? if(!is_array($keywords)){

    ? ? ? ? ? ? ? ? $keywords = [];

    ? ? ? ? ? ? }

                $prompt = sprintf( ‘%s. The user wants this keywords to be what guides your suggestion : %s.’, $prompt, implode(‘, ‘, $keywords) );

            }

    Thread Starter joedsileo1988

    (@joedsileo1988)

    My original fix results in improper prompts (though does work)

    This is better as it will not talk about keywords at all:

                if(is_array($keywords)){

                    $prompt = sprintf( ‘%s. The user wants this keywords to be what guides your suggestion : %s.’, $prompt, implode(‘, ‘, $keywords) );

                }

            }

    Plugin Support Val Meow

    (@valwa)

    Hey @joedsileo1988 ! ??

    Thank you very much for the detailed report. We will implement the necessary fixes in an upcoming update. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No Keywords, Magic Fix Error’ is closed to new replies.