email coupon problem


  • Default avatar
    massimo3    
     11 years ago
    0

    Hi,

    we bought the license of awo coupon pro in December 2012 and the other extension after one month.

    2 months ago we had updated virtuemart from version 2.0.2 to 2.20b and now, the extension that use to sent emails to the registered users does not work

    Can you please help us?

    Version Awo Coupon is : 2.1.3

    Version of Awo Email is : 2.0.4


    Thanks for your help.
    Regards,
    Alberto
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    I can have a look if you can pm me temporary admin access.
  • Default avatar
    massimo3    
     11 years ago
    0

    Yes, i send you a pm with the user and password
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    I took a look, and yes, it does not seem to work. I went to user manager->options and changed 'new account activation' to 'none', then tried to register. In this case it works. So I think the problem is the cron that is running. Maybe its having trouble writing to the file. Can you check the permissions on this file:
    www/media/awocouponEmail_checkfile....

    And make sure that the webserver can write to it
  • Default avatar
    massimo3    
     11 years ago
    0

    the file has permission 644, it is right?
  • Your avatar
    seyi    
     11 years ago
    0

    ok, delete the file. It should automatically get created. If not, that is a problem.
  • Default avatar
    massimo3    
     11 years ago
    0

    ok i deleted the file and after a registration it is created automatically but it still not does not work.

    what can i do?
  • Your avatar
    seyi    
     11 years ago
    0

    Ok, I turned on debug mode as I thought there might be an error, and there is, this is what it says:

    Joomla!
    500 - An error has occurred.
    JDatabaseMySQL::query: 1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SQL=SELECT u.id as user_id, u.email, u.username, u.registerDate, IFNULL(i.first_name,SUBSTRING(u.name,1,LOCATE(" ",u.name))) AS first_name, IFNULL(i.last_name,TRIM(SUBSTRING(u.name,IF(LOCATE(" ",u.name)=0,1,LOCATE(" ",u.name))))) AS last_name, COUNT(o.virtuemart_order_id) AS order_count FROM j7qm2_users u LEFT JOIN j7qm2_virtuemart_userinfos i ON i.virtuemart_user_id=u.id AND i.address_type="BT" LEFT JOIN j7qm2_awocoupon_plg_vm_email_register a ON a.user_id=u.id LEFT JOIN j7qm2_virtuemart_orders o ON o.virtuemart_user_id=i.virtuemart_user_id WHERE u.block=0 AND u.registerDate>="2012-12-18 00:00:00" AND a.user_id IS NULL GROUP BY u.id LIMIT 10

    Return to Control Panel

    Call stack
    #    Function    Location
    1    JAdministrator->render()    /htdocs/public/www/administrator/index.php:52
    2    JApplication->triggerEvent()    /htdocs/public/www/administrator/includes/application.php:204
    3    JDispatcher->trigger()    /htdocs/public/www/libraries/joomla/application/application.php:642
    4    JEvent->update()    /htdocs/public/www/libraries/joomla/event/dispatcher.php:161
    5    call_user_func_array()    /htdocs/public/www/libraries/joomla/event/event.php:71
    6    plgSystemAwocouponEmail->onAfterRender()     
    7    plgSystemAwocouponEmail->sendEmails()    /htdocs/public/www/plugins/system/awocouponEmail/awocouponEmail.php:71
    8    plgSystemAwocouponEmail->sendRegistrationEmails()    /htdocs/public/www/plugins/system/awocouponEmail/awocouponEmail.php:113
    9    JDatabase->loadObjectList()    /htdocs/public/www/plugins/system/awocouponEmail/awocouponEmail.php:193
    10    JDatabaseMySQL->execute()    /htdocs/public/www/libraries/joomla/database/database.php:1100
    11    JError::raiseError()    /htdocs/public/www/libraries/joomla/database/database/mysql.php:548
    12    JError::raise()    /htdocs/public/www/libraries/joomla/error/error.php:251


    Not really sure what to make of the error "The SELECT would examine more than MAX_JOIN_SIZE rows" as I have not seen it before.

    Can you access the database and run the query itself?
    SELECT u.id as user_id, u.email, u.username, u.registerDate, IFNULL(i.first_name,SUBSTRING(u.name,1,LOCATE(" ",u.name))) AS first_name, 
    IFNULL(i.last_name,TRIM(SUBSTRING(u.name,IF(LOCATE(" ",u.name)=0,1,LOCATE(" ",u.name))))) AS last_name, 
    COUNT(o.virtuemart_order_id) AS order_count
     FROM j7qm2_users u LEFT
     JOIN j7qm2_virtuemart_userinfos i ON i.virtuemart_user_id=u.id AND i.address_type="BT"
     LEFT JOIN j7qm2_awocoupon_plg_vm_email_register a ON a.user_id=u.id
     LEFT JOIN j7qm2_virtuemart_orders o ON o.virtuemart_user_id=i.virtuemart_user_id
     WHERE u.block=0 AND u.registerDate>="2012-12-18 00:00:00" AND a.user_id IS NULL GROUP BY u.id LIMIT 10


    If that does not work on its own, try this:
    SELECT u.id as user_id, u.email, u.username, u.registerDate, IFNULL(i.first_name,SUBSTRING(u.name,1,LOCATE(" ",u.name))) AS first_name, 
    IFNULL(i.last_name,TRIM(SUBSTRING(u.name,IF(LOCATE(" ",u.name)=0,1,LOCATE(" ",u.name))))) AS last_name, 
    COUNT(o.virtuemart_order_id) AS order_count
     FROM j7qm2_users u LEFT
     JOIN j7qm2_virtuemart_userinfos i ON i.virtuemart_user_id=u.id AND i.address_type="BT"
     LEFT JOIN j7qm2_awocoupon_plg_vm_email_register a ON a.user_id=u.id
     LEFT JOIN j7qm2_virtuemart_orders o ON o.virtuemart_user_id=u.id
     WHERE u.block=0 AND u.registerDate>="2012-12-18 00:00:00" AND a.user_id IS NULL GROUP BY u.id LIMIT 10


    Does that work? If not run the below query and then run the first 2 again.
    SET SQL_BIG_SELECTS=1;


    Does it work after running that?
  • Default avatar
    massimo3    
     11 years ago
    0

    Hello,

    i've try the query, but doesn't work, when i run the first and the second query, i saw this message at the top of the page:

    #1104 - The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay


    mmmmm...
  • Your avatar
    seyi    
     11 years ago
    0

    Hi,

    I am really not sure, I believe there is no problem with the query. Maybe there is an index missing in the database causing the query to use up more resources than it should. If you can pm temporary ftp access, I can play around with it to see if I can find a solution.
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    Took a look, ended up adding the below code to this file
    www/plugins/system/awocouponEmail/awocouponEmail.php

    <?php
        
    function __construct(& $subject$config) {                
            
    parent::__construct($subject$config);
            
    $db JFactory::getDBO();
            
    $db->setQuery('SET SQL_BIG_SELECTS=1;');
            
    $db->query();
        }
        
    ?>


    And that seems to have fixed the problem.