Administration error - (History of uses - Coupons)


  • Default avatar
    goretex34    
     13 years ago
    0

    I've encountered with a problem.
    I've used a pair of coupons, testing my brand new AWO Coupon PRO (updated from a free installed version) and everything's ok but entering in Administration->History of uses - Coupons,
    the system doesn't list anything and prints an error:

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/gadepe/public_html/libraries/joomla/database/database/mysqli.php on line 360



    and a bit below in the same page..

    Warning: Invalid argument supplied for foreach() in /home/gadepe/public_html/administrator/components/com_awocoupon/views/usershistory/tmpl/default_coupon.php on line 62


    Some idea of what the problem is?

    Thanks

    P.S. I've Examined mysql table jos_awocoupon_user_uses and it's like this (4ur help):

    id     coupon_id     coupon_entered_id     user_id     coupon_discount     timestamp     shipping_discount     order_number     productids
    1     8     8     66     0.00000     0000-00-00 00:00:00     0.00000     NULL     NULL
    2     8     8     65     23.63000     2011-07-04 05:45:15     0.00000     65_38f81816650d7109c69baeacf0c95     94
  • Your avatar
    seyi    
     13 years ago
    0

    Hmm, I cannot tell what is causing the problem. Can you turn on debug mode in admin->site->global configuration->systems tab. Once that is done, refresh the history of uses page. It should tell you exactly what the error is in mysql.
  • Default avatar
    goretex34    
     13 years ago
    0

    500 - An error has occurred.

    JDatabaseMySQL::query: 1267 - Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' SQL=SELECT c.id,c.coupon_code,c.num_of_uses,c.coupon_value_type,c.coupon_value, c.min_value,c.discount_type,c.function_type,c.startdate,c.expiration,c.published, uu.coupon_id,uu.coupon_entered_id,c2.coupon_code as coupon_entered_code, uu.id as use_id,uv.user_id,uv.first_name,uv.last_name,uu.user_id,u.username, (uu.coupon_discount+uu.shipping_discount) AS discount,uu.order_number,uu.productids,uu.timestamp,ov.order_id,ov.cdate FROM jos_awocoupon_user_uses uu JOIN jos_awocoupon c ON c.id=uu.coupon_id LEFT JOIN jos_awocoupon c2 ON c2.id=uu.coupon_entered_id JOIN jos_vm_user_info uv ON uv.user_id=uu.user_id AND uv.address_type="BT" LEFT JOIN jos_users u ON u.id=uu.user_id LEFT JOIN jos_vm_orders ov ON ov.order_number=uu.order_number ORDER BY c.coupon_code LIMIT 0, 20

    Call stack
    # Function Location
    1 JAdministrator->dispatch() /home/gadepe/public_html/administrator/index.php:67
    2 JComponentHelper->renderComponent() /home/gadepe/public_html/administrator/includes/application.php:136
    3 require_once() /home/gadepe/public_html/libraries/joomla/application/component/helper.php:162
    4 JController->execute() /home/gadepe/public_html/administrator/components/com_awocoupon/admin.awocoupon.php:29
    5 JController->display() /home/gadepe/public_html/libraries/joomla/application/component/controller.php:236
    6 AwoCouponViewUsersHistory->display() /home/gadepe/public_html/libraries/joomla/application/component/controller.php:310
    7 JView->get() /home/gadepe/public_html/administrator/components/com_awocoupon/views/usershistory/view.html.php:48
    8 AwoCouponModelUsersHistory->getData() /home/gadepe/public_html/libraries/joomla/application/component/view.php:364
    9 JModel->_getList() /home/gadepe/public_html/administrator/components/com_awocoupon/models/usershistory.php:57
    10 JDatabaseMySQLi->loadObjectList() /home/gadepe/public_html/libraries/joomla/application/component/model.php:284
    11 JDatabaseMySQLi->query() /home/gadepe/public_html/libraries/joomla/database/database/mysqli.php:474
    12 JError->raiseError() /home/gadepe/public_html/libraries/joomla/database/database/mysqli.php:247
    13 JError->raise() /home/gadepe/public_html/libraries/joomla/error/error.php:171
    14 JException->__construct() /home/gadepe/public_html/libraries/joomla/error/error.php:136
  • Your avatar
    seyi    
     13 years ago
    0

    Yes, I have seen that error before, it has to do with the character set of the tables not being compatible. Ok, in phpmyadmin, take a look at these tables specifically:

    jos_awocoupon_user_uses
    jos_awocoupon
    jos_vm_user_info

    One or more of the character sets is off. utf8_general_ci and utf8_unicode_ci do not mix it seems. You would probably have to change both the column (collation) and the table charset. To modify the table look under operations tab.
  • Default avatar
    goretex34    
     13 years ago
    0

    I've changed the collation for the awo tables:
    jos_awocoupon_user_uses
    jos_awocoupon

    to utf8_general_ci
    in order to be as the jos_vm_user_info table
    and I still have the same problem.

    I've also deleted the 2 entrances I had in the jos_awocoupon_user_uses table, but the error persists...
    Any idea?
    Thanx
  • Your avatar
    seyi    
     13 years ago
    0

    did you change the collation of the individual columns also?
  • Default avatar
    goretex34    
     13 years ago
    0

    No, I didn't chage the individual columns collation.

    Really I have undone all changes and applied only 2 for the "jos_awocoupon_user_uses" table:

    1.Changed column "order_number" collation from utf8_unicode_ci to utf8_general_ci
    2.Changed general collation from utf8_unicode_ci to utf8_general_ci (table's collation)

    In administration, it lists correctly the History of used Coupons ;-)

    Let's hope it doesn't fail when Gift will be done...

    Thanx 4all