Error updating database


  • Default avatar
    dustin_j    
     3 years ago
    0

    Updating AwoCoupon from 3.5.7.1 on Joomla 3.9.19 and tried to update to AWOCoupon 3.6.0.1


    Received the following error on install:


    Error updating database


    Using with Hikashop 4.4.0


    Please advise.

  • Your avatar
    seyi    
     3 years ago
    0

    You could manually update it.

    Go into the folder
    /administrator/components/com_awocoupon/awocoupon/library/install/upgrade/sql/

    There you will find sql files corresponding to the versions sql update. Run the files you need, updating #__ for your actual database prefix.

    Then run the command:
    UPDATE #__awocoupon_config SET value="3.6.0.1" WHERE name="AWOCOUPON_VERSION_DB"


  • Default avatar
    dustin_j    
     3 years ago
    0

    Getting the following error when trying to run queries from the. 3.5.7.sql file (after updating #__ of course)


    #1060 - Duplicate column name 'coupon_code'

  • Your avatar
    seyi    
     3 years ago
    0

    Yes, this is probably why the update is failing.  Look closely at the errors.  If the column already exists then you do not need to add it, so skip as needed.
  • Default avatar
    dustin_j    
     3 years ago
    0

    Thank you. I'll work through it line by line. Do I need to execute the queries for each file or only the version I upgraded from? e.g. just 3.5.7.sql or 3.5.7.sql,  3.5.8.sql, 3.5.9.sql and 3.6.0.sql?
  • Your avatar
    seyi    
     3 years ago
    0

    You already had 3.5.7.1, so just these:
    - 3.5.8
    - 3.5.9
    - 3.6.0
  • Default avatar
    dustin_j    
     3 years ago
    0

    Worked through line by line for the files mentioned. Now I am getting an endless loop in the AWOcoupon dashboard. I've cleared the cache and same issue. Any ideas?



  • Your avatar
    seyi    
     3 years ago  last edited 3 years ago
    0

    In the file /administrator/components/com_awocoupon/awocoupon_j3.xml, change the version line to this

     <version>3.6.0.1</version>

    And that should do it.
  • Default avatar
    dustin_j    
     3 years ago
    0

    Thank you! That did it for the dashbaord. However, I'm getting a similar issue on the Reports page. Just loads endlessly.


    JS Console shows the following: Failed to load resource: the server responded with a status of 500 ()

    For this URL: /administrator/index.php?option=com_awocoupon&tmpl=component&no_html=1&ajax=yes&type=admin&view=report&urlx=%2Fadministrator%2Findex.php%3Foption%3Dcom_awocoupon%23%2Fawocoupon%2Freport&cache=609012

  • Your avatar
    seyi    
     3 years ago
    0

    Hello,

    Not sure.  Might it be browser cache?  Possible to send me a private message with temp admin access to have a look?
  • Default avatar
    dustin_j    
     3 years ago
    0

    Access info sent via private message. Thank you for taking a look!
  • Your avatar
    seyi    
     3 years ago
    0

    Here is the error:

    Can you look in the file:
    /administrator/components/com_awocoupon/awocoupon/library/install/mysql.install.sql

    And verify all those tables are installed in your database.

  • Default avatar
    dustin_j    
     3 years ago  last edited 3 years ago
    0

    They all appear to be there minus that one.




  • Default avatar
    dustin_j    
     3 years ago
    0

    I added the missing table and it now appears to be working correctly everywhere! Thank you!


    One other question: In Reports is there a way to schedule these? For example, we would like to automatically send out the Customer Balance Report to an admin via email once per week.

  • Your avatar
    seyi    
     3 years ago
    0

    No you would have to create a function and a cron to do something like that automatically.
  • Default avatar
    dustin_j    
     3 years ago
    0

    kk - Thank you for your help!