• evomind

    (@evomind)


    Notice: Undefined index: feeds_api_key in C:\xampp\htdocs\www.mysite.com\wp-content\plugins\rss-post-importer\app\class-rss-post-importer.php on line 43

    May I know what is the problem?

Viewing 4 replies - 1 through 4 (of 4 total)
  • khmercms

    (@khmercms)

    I am also get the problem Notice: Undefined index: feeds_api_key in /home/khmeojyn/public_html/www.cambopage.com/wp-content/plugins/rss-post-importer/app/class-rss-post-importer.php on line 43

    need the help too

    camille_feedsapi

    (@camille_feedsapi)

    Hi,

    Thank you for reaching out.

    For that issue,can you try to do this and let me know what happens.

    1.) Edit permissions on the folders and sub folders on rss-post-importer plugin so it can create the folder once the command is executed.

    2.) Create a folder named RSS_PI_LOG_PATH manually C:\xampp\htdocs\www.mysite.com\wp-content\plugins\rss-post-importer\

    3.) Delete the command on line 43 via index.php file.

    Let me know soon.

    Best,
    Camille | Feedsapi

    Hi @camille_feedsapi,

    Thank you for taking the time to respond to this issue.

    I am also getting the above notice since this morning without changing anything in my plugin settings. This is followed by a warning:

    Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at myserver/public_html/wp-content/plugins/rss-post-importer/app/class-rss-post-importer.php:43)

    which led to a complete shutdown of my site.

    Would you be able to help resolve this issue?

    1) How is it that this issue just came up now, without any change in the plugin settings from my part? I didn’t run into this while using the plugin for over a year.

    2) How can I resolve the issue?

    You mention above to edit the permissions on the folders and sub-folders on the plugin. They are all fine.
    I do not understand what you mean by deleting the command on line 43 via index.php file. The notice refers to line 43 in “class-rss-post-importer.php” file, and index.php includes this file, which is of course necessary for the functionality of the plugin. Can you explain?

    Any help would be greatly appreciated.

    Thank you!

    For anyone else having trouble with this, here’s how I resolved it:

    Line 43 in wp-content/plugins/rss-post-importer/app/class-rss-post-importer.php reads:
    'feeds_api_key' => sanitize_key($_POST['feeds_api_key'])

    Since I am not a premium user, I don’t have an API key. There’s nothing posting as ‘feeds_api_key’, and this triggers the above notice.

    To fix it, I commented that line out, and replaced it with:
    'feeds_api_key' => ''

    If you are going to use this for yourself, please note:
    * Since I edited the plugin file directly, any upgrade may cause this edit to be overwritten.
    * If I ever choose to upgrade, and use an API key, I must revert to the original code for the upgrade to take effect.
    (* The reason I replaced the line, is because this index is used later on in the code. If you just comment it out, then the code will trigger the same notice on line 49.)

    If you plan to upgrade eventually, here’s a better solution:

    Add this code above line 42 (which reads: $settings = array():

    `if ( isset($_POST[‘feeds_api_key’]) )
    {
    $feeds_api_key = sanitize_key($_POST[‘feeds_api_key’]);
    }
    else
    {
    $feeds_api_key = ”;
    }`

    and replace the code from line 43 with:
    'feeds_api_key' => $feeds_api_key

    This will first check if an API key was posted. If you have an API key, it will use that, and if not, it will replace the ‘undefined index’ with an empty string.

    Good Luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error on Feeds API Key’ is closed to new replies.