Fork me on GitHub

ItsNews error on subscribing  Bottom

  • Every time a new unlogged user subscribe to the newsletter, after sendind the form it is printed this error message:

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>= '1' ORDER BY ASC' at line 1
    SELECT pn_prop_id AS "prop_id",pn_prop_label AS "prop_label",pn_prop_dtype AS "prop_dtype",pn_prop_length AS "prop_length",pn_prop_weight AS "prop_weight",pn_prop_validation AS "prop_validation" FROM zk_site_user_property AS tbl WHERE >= '1' ORDER BY ASC

    Exit-Handler: Exiting after SQL-error
  • I created a ticket here http://code.zikula.org/dits/ticket/32. Will investigate.
  • Arkanoyd, which version Zikula are you running? Which module have you set to manage user profiles?
  • zikula 1.1.1 and Profile module...
  • I've investigated. Conclusion:

    In pnuser.php line 449 (function ItsNews_user_subscribeunsubscribe_request) the API function pnUserGetAll() is called to check if the email address provided by anonymous user that tries to subscribe is not the same as the email address of a registered user. In that case the anonymous user is informed and redirected to login.

    The error message that you see comes from pnUserGetAll() (includes/pnUser.php line 709). The call to pnModDBInfoLoad on line 726 is supposed to merge information about the Profile module database tables with the global database table information array. This does not happen. It's either a bug in the Profile module or in the pnModDBInfoLoad function. I'll submit a bug report for this.

    To get around this error in modules/ItsNews/pnuser.php you can replace this

    Code

    // get registered users
        $allusers = pnUserGetAll();
        if ($allusers === false) {
            return pnVarPrepHTMLDisplay(_ITSNEWSUSERSGETFAILED);
        }

    with

    Code

    // get registered users
        $allusers = array();
    //    $allusers = pnUserGetAll();
    //    if ($allusers === false) {
    //        return pnVarPrepHTMLDisplay(_ITSNEWSUSERSGETFAILED);
    //    }
  • The issue is already more or less known : http://code.zikula.org/core/ticket/952
  • Thank you very much!!! icon_smile
    I modified also pnadmin.php with the same replacements because I couldn't also add new users from administration.
    There is also a minor bug in itsnews_admin_menu that cause an error message:

    Code

    <!--[modulestylesheet stylesheet=admin.css modname=admin xhtml=true]-->

    it seems to be obsolete...



    edited by: arkanoyd, May 15, 2009 - 03:14 AM

This list is based on users active over the last 60 minutes.