Skip to content

Commit

Permalink
Fix jQuery path issues again after finding the real problem behind th…
Browse files Browse the repository at this point in the history
…e two different versions downloaded between two servers. See 3385959 for the initial (reverse) fix
  • Loading branch information
ywarnier committed Feb 9, 2016
1 parent d72dfe8 commit 19f4818
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Expand Up @@ -74,6 +74,7 @@ Pick a password for the MySQL server and enter it twice, when prompted.
root@docker$ cd /var/www
root@docker$ rm -rf html
root@docker$ git clone --single-branch -b 1.10.0-beta https://github.com/chamilo/chamilo-lms.git html
root@docker$ cd html
root@docker$ chmod -R 0777 app/ vendor/ main/lang/ main/default_course_document/images/ web/
root@docker$ vim /etc/php5/apache2/php.ini
```
Expand Down
39 changes: 34 additions & 5 deletions README.md
Expand Up @@ -57,6 +57,21 @@ composer global require "fxp/composer-asset-plugin:1.0.3"
composer update
```

If you ever face issues with scrollbars not appearing or JavaScript generating
errors, you might need to ensure that your web/assets folder is completely
re-generated.
Use this set of commands to do that:
```
composer global require "fxp/composer-asset-plugin:1.0.3"
rm composer.lock
rm -rf web/assets
composer clear-cache
composer update
```
This will take longer, but should definitely generate the
web/assets/jquery/dist/jquery.min.js file (jQuery 2.2 or superior), which was
not present in Chamilo versions previous to 1.10.4.

### Change permissions

On a Debian-based system, launch:
Expand All @@ -66,20 +81,34 @@ sudo chown -R www-data:www-data app main/default_course_document/images main/lan

### Start the installer

In your browser, load the Chamilo URL. You should be automatically redirected to the installer. If not, add the "main/install/index.php" suffix manually in your browser address bar. The rest should be a matter of simple OK > Next > OK > Next...
In your browser, load the Chamilo URL. You should be automatically redirected
to the installer. If not, add the "main/install/index.php" suffix manually in
your browser address bar. The rest should be a matter of simple
OK > Next > OK > Next...

## Upgrade from 1.9.x

1.10.x is a major version. As such, it contains a series of new features, that also mean a series of new database changes in regards with versions 1.9.x. As such, it is necessary to go through an upgrade procedure when upgrading from 1.9.x to 1.10.x.
1.10.0 is a major version. It contains a series of new features, that
also mean a series of new database changes in regards with versions 1.9.x. As
such, it is necessary to go through an upgrade procedure when upgrading from
1.9.x to 1.10.x.

Although 1.10.x is not beta yet (and as such is *NOT* ready for production and does *NOT* contain all database changes yet - DO NOT UPGRADE A PRODUCTION SYSTEM to 1.10.x yet, PLEASE!), the upgrade procedure works to get you up and running with the latest *development* code of 1.10.x with data from an 1.9.x system, so feel free to test it out, but keep a backup of your database from 1.9.x as you will need to do the upgrade again each time you are updating the 1.10.x code from Git.
When we published 1.10.0, we didn't catch a series of important upgrade errors.
We released a warning a few days later asking people not to upgrade from 1.9.x
to 1.10.0 for the time being. Version 1.10.2 fixed that, and you can now
safely upgrade from any 1.9.x version to any 1.10.x version higher than 1.10.0.

The upgrade procedure is relatively straightforward. If you have a 1.9.x initially installed with Git, here are the steps you should follow (considering you are already inside the Chamilo folder):
The upgrade procedure is relatively straightforward. If you have a 1.9.x
initially installed with Git, here are the steps you should follow
(considering you are already inside the Chamilo folder):
```
git fetch --all
git checkout origin 1.10.x
```
Then load the Chamilo URL in your browser, adding "main/install/index.php" and follow the upgrade instructions. Select the "Upgrade from 1.9.x" button to proceed.

Then load the Chamilo URL in your browser, adding "main/install/index.php" and
follow the upgrade instructions. Select the "Upgrade from 1.9.x" button to
proceed.

# For developers and testers only

Expand Down
2 changes: 1 addition & 1 deletion main/inc/lib/template.lib.php
Expand Up @@ -666,7 +666,7 @@ public function set_js_files()

$bowerJsFiles = [
'modernizr/modernizr.js',
'jquery/jquery.min.js',
'jquery/dist/jquery.min.js',
'bootstrap/dist/js/bootstrap.min.js',
'jquery-ui/jquery-ui.min.js',
'moment/min/moment-with-locales.min.js',
Expand Down

3 comments on commit 19f4818

@ywarnier
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is incomplete. It is extended by 250dee1

@jmontoyaa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this fix the problem

After doing all those steps (composer clean,etc) I do this:

composer show | grep bower-asset/jquery

And I got this:

  bower-asset/jquery
  bower-asset/jquery.inputmask
  bower-asset/jquery                    2.0.0              jQuery component
  bower-asset/jquery-timeago            v1.4.3             
  bower-asset/jquery-ui                 1.11.4             
  bower-asset/jquery.scrollbar          0.2.10             
  bower-asset/jqueryui-timepicker-addon v1.5.5  

When I go to the repo of jquery/jquery here:

bower-asset/jquery 2.0.0

https://github.com/jquery/jquery/releases/tag/2.0.0

There's nothing inside the dist/ folder ...

@jmontoyaa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm doing something wrong?

Please sign in to comment.