chamilo / chamilo-lms

Chamilo is a learning management system focused on ease of use and accessibility
https://chamilo.org
GNU General Public License v3.0
785 stars 478 forks source link

[Plugin] Sell courses v 7.1 issue in multi url setup #5157

Open ashishkpaul opened 7 months ago

ashishkpaul commented 7 months ago

Describe A clear and concise description of what the bug is.

Chamilo In a Multi-URL env. version 1.11.26, when i disable the Sell courses plugin through parent site, getting error "An error has occurred. Please contact your system administrator." on multi url site. Error on console

tail -f /var/log/nginx/training-ustrides-error.log
        )

)" while reading response header from upstream, client: 140.238.255.121, server: lms.ustride.com, request: "GET /main/glossary/glossary.js.php?cidReq=TESTS&id_session=0&gidReq=0&gradebook=0&origin= HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "lms.ustride.com", referrer: "https://lms.ustride.com/main/lp/lp_final_item.php?&id=0&lp_id=359&cidReq=TESTS&id_session=0&gidReq=0&gradebook=0&origin=learnpath&session_id=0"
2024/02/13 19:51:19 [error] 1044146#1044146: *75824 FastCGI sent in stderr: "PHP message: An exception occurred while executing 'SELECT i.*,c.iso_code FROM 
            plugin_buycourses_item i
            INNER JOIN plugin_buycourses_currency c
                ON i.currency_id = c.id
          WHERE i.product_id = '136' AND i.product_type = '1'':

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'trbsCmClhwAM.plugin_buycourses_item' doesn't exist" while reading response header from upstream, client: 140.238.255.121, server: lms.ustride.com, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "lms.ustride.com", referrer: "https://lms.ustride.com/courses/CORPORATEBLISSBLUEPRINT/index.php?id_session=0"

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Administration'
  2. Click on 'Plugins'
  3. Scroll down to 'Sell Courses'
  4. See error getting error on multi url site as described above Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

**Server

Additional context Add any other context about the problem here.

ywarnier commented 7 months ago

Hi, look at the README for the plugin and make sure you execute the commands documented manually. Chamilo doesn't support plugin updates automatically yet :-/ Here the message is relatively clear : it is trying to remove a table that does not exist. By creating the table manually (with the README instructions), you should be able to refresh again and get the process running