error 1054 when trying to open coupons in admin


  • Default avatar
    serena    
     6 months ago
    0

    i'm running j3.5.1 awocoupon 2.4.5
    and get this error when opening coupon page in administration

    1054 Unknown column 'c.upc' in 'field list' SQL=SELECT c.id,c.coupon_code,c.num_of_uses_total,c.num_of_uses_customer,c.coupon_value_type, c.coupon_value,c.coupon_value_def,c.upc, c.min_value,c.discount_type,c.user_type,c.function_type,c.startdate,c.expiration,c.order_id,c.published, 0 as usercount,0 as asset1count,0 as asset2count,c.exclude_giftcert,c.note, c.parent_type,c.params, GROUP_CONCAT(t.tag separator ", ") as coupon_tags FROM #__awocoupon c LEFT JOIN #__awocoupon_tag t ON t.coupon_id=c.id WHERE estore="virtuemart" GROUP BY c.id ORDER BY c.coupon_code LIMIT 0, 20

    I KNOW it is an old version and i tried to upgrade using the live upgrade and even a manual installation but both time i get the error below:
    Warning
    Unknown column 'email_subject_lang_id' in '#__awocoupon_profile' SQL=ALTER TABLE #__awocoupon_profile CHANGE email_subject_lang_id idlang_email_subject INT
    Message
    Install component Error


    how can i do?
  • Your avatar
    seyi    
     6 months ago
    0

    Hello,

    What did you upgrade from?

    YOu can look in www/administrator/components/com_awocoupon/helpers/install/upgrade/sql/ folder.

    There it has the queries run for each update. If you know what you were updating from, lets say 2.4.3, then you would need to manually run 2.4.3 and up directly on your database.
  • Default avatar
    serena    
     6 months ago
    0

    i migrated from another hosting but it seems i'm missing parts! i used to upgrade from the live upgrade tool and do not remember what was the version on the other hosting. so i started from the 1st available upgrade table 2.0 but.. i get this error:
    the table awocoupon_vm does not exist

    can you help please? :(
  • Your avatar
    seyi    
     6 months ago
    0

    Hello,

    Happy to look at it if you can send temp admin and ftp access via private message.

    If you start from the first you will get errors such as that. They can be safely ignored. I would not go as far back as 2.0.0 though as the database changes from there to now have been dramatic. Try a little sooner, 2.3.0.
  • Default avatar
    serena    
     6 months ago
    0

    i sent you a pm ^_^ thank you
  • Your avatar
    seyi    
     6 months ago
    0

    Hello,

    Thanks for the access. It seems in the end only the last query needed to be run:

    ALTER TABLE #__awocoupon ADD COLUMN upc VARCHAR(255) AFTER passcode;



    So now AwoCoupon is updated to the latest, 2.4.8. Let me know if you see any other issues.
  • Default avatar
    serena    
     6 months ago
    0

    i've tried to run this query but the result is:
    Query SQL:


    ALTER TABLE ohm_awocoupon ADD COLUMN upc VARCHAR(255) AFTER passcode
    Messaggio di MySQL: Documentazione

    #1060 - Duplicate column name 'upc'


    so i've tried to create a new coupon but i can't save it...
  • Your avatar
    seyi    
     6 months ago
    0

    Hello,

    I already ran it so you did not have to.

    I tested adding a coupon and it works fine for me. Can you clear your browser cache? You may be loading an old javascript file causing errors on the page.