Upgraded a recently installed PiaF Centos 5.7 setup from 2.9 to 2.10 and lost all my CSS. The CSS files called in the head of the HTML (common/mstyle_autogen_1330716857.css?load_version=2.10.0.2 and assets/core/css/core.css) both return 404 Not Found. Anyone else have this happen to them? Anything I can do? I found this in the PHP error log, not sure if it’s normal or not:
2012-Mar-19 16:09:54 /var/www/html/admin/modules/framework/upgrades/2.10.0beta2/migration.php:80
[WARNING]: rmdir(/var/www/html/admin/common): Directory not empty
Here’s what those directories that should have CSS look like; no permissions problems or anything like that.
$ cd /var/www/html/admin/
$ ls -lah common/
total 60K
drwxrwx--- 2 asterisk asterisk 4.0K Mar 19 16:09 .
drwxrwx--- 10 asterisk asterisk 4.0K Mar 19 16:09 ..
-rw-rw-r-- 1 asterisk asterisk 7.0K Apr 17 2011 graph_pie.php
-rw-rw-r-- 1 asterisk asterisk 44K Apr 17 2011 jquery-ui-1.8.custom.min.js
$ ls -lah assets/
total 24K
drwxrwxr-x 6 asterisk asterisk 4.0K Feb 8 18:22 .
drwxrwx--- 10 asterisk asterisk 4.0K Mar 19 16:09 ..
drwxrwxr-x 2 asterisk asterisk 4.0K Mar 19 16:09 css
drwxrwxr-x 5 asterisk asterisk 4.0K Aug 18 2011 endpointman
drwxrwxr-x 3 asterisk asterisk 4.0K Mar 19 16:09 images
drwxrwxr-x 2 asterisk asterisk 4.0K Mar 19 16:09 js
lrwxrwxrwx 1 asterisk asterisk 46 Jan 24 19:22 sipsettings -> /var/www/html/admin/modules/sipsettings/assets
I set “DISABLE_CSS_AUTOGEN” to “1” in the advanced settings. I had to do this in the database directly, since the settings page didn’t work without the CSS in place. That’s a problem for another time.
After that I reinstalled the Framework and Core modules, which seems to have fixed things completely:
$ ls -lah assets/
total 24K
drwxrwxr-x 6 asterisk asterisk 4.0K Mar 19 17:52 .
drwxrwx--- 10 asterisk asterisk 4.0K Mar 19 16:09 ..
lrwxrwxrwx 1 asterisk asterisk 41 Mar 19 17:52 backup -> /var/www/html/admin/modules/backup/assets
lrwxrwxrwx 1 asterisk asterisk 39 Mar 19 17:52 core -> /var/www/html/admin/modules/core/assets
drwxrwxr-x 2 asterisk asterisk 4.0K Mar 19 16:09 css
lrwxrwxrwx 1 asterisk asterisk 44 Mar 19 17:52 directory -> /var/www/html/admin/modules/directory/assets
drwxrwxr-x 5 asterisk asterisk 4.0K Aug 18 2011 endpointman
drwxrwxr-x 3 asterisk asterisk 4.0K Mar 19 16:09 images
lrwxrwxrwx 1 asterisk asterisk 38 Mar 19 17:52 ivr -> /var/www/html/admin/modules/ivr/assets
drwxrwxr-x 2 asterisk asterisk 4.0K Mar 19 16:09 js
lrwxrwxrwx 1 asterisk asterisk 43 Mar 19 17:52 logfiles -> /var/www/html/admin/modules/logfiles/assets
lrwxrwxrwx 1 asterisk asterisk 46 Jan 24 19:22 sipsettings -> /var/www/html/admin/modules/sipsettings/assets
As Tony mentions, it would be nice to file a bug report with detailed repro steps on this since there have been thousands of upgrades that have worked, we’d like to understand what are the circumstances that might be causing this.
In the meantime, it’s not a very good idea to go editing the database or suggesting that people do that. If you have a setting that needs to be set, you can simply type:
[root@localhost ~]# /var/lib/asterisk/bin/freepbx_setting
Usage:
/var/lib/asterisk/bin/freepbx_setting RAW_SETTING_NAME <value>
RAW_SETTING_NAME is case sensitive and almost always all CAPS
Boolean settings should be set with 0 for false and 1 for true
This will make sure that it get’s properly set and validated so that you don’t get any garbage into the database by accident.
But again, details in a bug report is what is most helpful