[Prestashop] Problem to uninstall AwoRewards


  • Default avatar
    riga75    
     4 months ago
    0

    I have to delete Aworewards but when I try to do so I get this message:     
    Unable to uninstall aworewards module. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id_tab' in 'where clause'.

    What can I do?

    Thanks a lot

    Stefano
  • Your avatar
    seyi    
     4 months ago
    0

    Hello,

    In the file:

    /modules/aworewards/helpers/class-aworewards-helper-update.php, around line 99, delete the this line:

    <?php
                    Db
    ::getInstance()->execute('DELETE FROM ' _DB_PREFIX_ 'access WHERE id_tab = '.(int)($id_tab));
    ?>

    that should fix the issue.
  • Default avatar
    riga75    
     4 months ago
    0

    I cannot find that line of code in that file :(
  • Your avatar
    seyi    
     4 months ago
    0

    That is the only way you could be receiving that error.  It is in the uninstall function, the 3rd delete sql statement run.
  • Default avatar
    riga75    
     4 months ago
    0

    OK, but if that line of code does not exist, what can I do?
  • Your avatar
    seyi    
     4 months ago
    0

    Ok, you can empty out the uninstall function so it looks like this:
    <?php
        
    public function uninstall() {
        }
    ?>

    If that works you will need to manually delete the aworeward tables in the db.
  • Default avatar
    riga75    
     4 months ago
    0

    Sorry so I have to go to the file:
    /modules/aworewards/helpers/class-aworewards-helper-update.php
    and delete everything and just write
    <?php
        
    public function uninstall() {
        }
    ?>



    Sorry but I'm not a programmer and can't attach the zip or php file here, thanks
  • Your avatar
    seyi    
     4 months ago
    0

    No, delete all the lines inside the uninstall function, so that is all that is left, just for the uninstall function.  Everything else should stay the same.