• Have been a premium user and used this plugin for years. Latest update completely breaks it. Things like

    WordPress database error Unknown column ‘id’ in ‘field list’ for query SELECT COUNT(id) ‘FROM wp_nxs_query WHERE timetorun<\’2024-06-22 18:59:07\” made by do_action_ref_array(‘nxs_querypost_event’), WP_Hook->do_action, WP_Hook->apply_filters, nxs_checkQuery

    or WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ”wp_nxs_log’ SET flt = ‘snap’ WHERE flt IS NULL OR flt = ”’ at line 1 for query UPDATE ‘wp_nxs_log’ SET flt = ‘snap’ WHERE flt IS NULL OR flt = ” made by do_action_ref_array(‘nxs_hourly_event’), WP_Hook->do_action, WP_Hook->apply_filters, nxs_do_this_hourly

    ChatGPT tells me the correct query should be:

    UPDATE wp_nxs_log SET flt = 'snap' WHERE flt IS NULL OR flt = '';

    or this:

    DELETE FROM wp_nxs_log WHERE flt = ‘cron’ AND id NOT IN ( SELECT id FROM ( SELECT id FROM wp_nxs_log ORDER BY id DESC LIMIT 360 ) foo );

    The previous version works just fine but it has security issues apparently?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Seems like developer got confused about how prepared statements work. I’ve fixed most of them to get a client’s site back up and running asap but I’m really not happy about it. My forehead hurts from all the facepalms ??

    Thread Starter WPJEDI

    (@cyrus100)

    I have a bunch of sites myself. I am waiting to see if the developer will fix this. If not, I will either do it myself with the help of ChatGPT or try something else. I am a premium member. I opened a ticket a few days ago and still have not heard back. It doesn’t look good, I have to say

    YES, for a week its stopped working, Mine is FREE Version

    in its log it shows “| WHERE (flt = “snap” OR (flt = “cron” AND (type = “E” OR type=”W”))) | “

    my SNAP is posting/reposting to Telegram, and other WP based websites, it post when new Post is written ONLY, repost of old posts is not working(stopped working).

    it was working for years on multiple websites. There was new other plugin installed, and any change in website.

    Hi , our sites have this issue on the latest version of wordpress .I cannot see it being fixed as the developer has not updated the code in 2 years .Missing in action .

    My background is not web development .

    If anyone has coding changes that they manage to get to work , it would be super helpful if you post them here .

    Thanks

    Thread Starter WPJEDI

    (@cyrus100)

    This plugin was updated 3 weeks ago? I am going to give the developer the benefit of the doubt but I’ll have to rethink our premium subscription if we don’t hear soon. I assume he is maybe taking a bit of time off for the summer. This was a wonderful plugin but this update has issues.

    m seeing the same issue as well. Hopefully there will be an update soon

    @cyrus100 , I stand corrected – you are correct – the file dates are 22/06/2024

    (i’ve got mine working by downgrading the plugin from a backup – file dates 27/10/2022)

    • This reply was modified 4 months, 3 weeks ago by mpearman.

    Downgrading to 4.4.3, should fix the posting issues. Multiple features are broken as of 4.4.3.

    Thread Starter WPJEDI

    (@cyrus100)

    Downgrading works but the plugin has security vulnerabilities.

    Same issue here.

    budy74

    (@budy74)

    Same here with Pro Version 4.4.6, after the update the plugin does not post anymore.
    I downgraded to 4.4.3 and it works perfectly… hope developers will fix this!!

    net

    (@krstarica)

    To fix these issues edit wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_functions_wp.php

    Replace:

    $wpdb->query(
            $wpdb->prepare(
                    'UPDATE %s SET flt = %s WHERE flt IS NULL OR flt = %s',
                    $wpdb->prefix . 'nxs_log',
                    'snap',
                    ''
            )
    );

    with:

    $wpdb->query( 'UPDATE '.$wpdb->prefix . 'nxs_log SET flt="snap" WHERE flt IS NULL OR flt=""');

    Replace:

    $wpdb->query(
            $wpdb->prepare(
                    'DELETE FROM %s WHERE flt = %s AND id NOT IN (
        SELECT id FROM (
            SELECT id FROM %s ORDER BY id DESC LIMIT 360
        ) foo
    )',
                    $wpdb->prefix . 'nxs_log',
                    'cron',
                    $wpdb->prefix . 'nxs_log'
            )
    );

    with:

    $wpdb->query( 'DELETE FROM '.$wpdb->prefix . 'nxs_log WHERE flt="cron" AND id NOT IN (SELECT id FROM (SELECT id FROM '.$wpdb->prefix . 'nxs_log ORDER BY id DESC LIMIT 360) foo)');

    Replace:

    $wpdb->query(
            $wpdb->prepare(
                    'DELETE FROM %s WHERE id <= (
        SELECT id FROM (
            SELECT id FROM %s ORDER BY id DESC LIMIT 1 OFFSET %d
        ) foo
    )',
                    $wpdb->prefix . 'nxs_log',
                    $wpdb->prefix . 'nxs_log',
                    $numLogRows
            )
    );

    with:

    $wpdb->query(
            $wpdb->prepare(
                    'DELETE FROM '.$wpdb->prefix . 'nxs_log WHERE id <= (
        SELECT id FROM (
            SELECT id FROM '.$wpdb->prefix . 'nxs_log ORDER BY id DESC LIMIT 1 OFFSET %d
        ) foo
    )',
                    $numLogRows
            )
    );

    Replace:

    $sql = $wpdb->prepare( "SELECT * FROM %s ORDER BY id DESC LIMIT %d, 300", $wpdb->prefix.'nxs_log'.$whOut, $pg);
    $log = $wpdb->get_results($sql, ARRAY_A);  if (!is_array($log)) return array(); else return $log;

    with:

    $log = $wpdb->get_results( "SELECT * FROM ". $wpdb->prefix . "nxs_log ".$whOut." ORDER BY id DESC LIMIT ".intval($pg).",300", ARRAY_A );  if (!is_array($log)) return array(); else return $log;
Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.