AT Commerce-theme (Drupal)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

Klonen naar subtheme (zomer 2016)

Zoals hiernaast geïllustreerd, de plaatsing van de regions wordt in de war geschopt.

  • De regel base theme = adaptivetheme aanpassen in base theme = ac_commerce is geen oplossing
Klonen van het theme + aanpassen .info-bestand, stelt weinig voor. Waar ik meer moeite mee heb: De regions worden door de war geschopt. Hoe komt dat?
Voorbeeld van een CSS-bestand dat na klonen niet meer gevonden wordt. Dit is het complete pad: example.com/sites/default/files/adaptivetheme/at_commerce_files/at_commerce.fonts.css?obllvx. Vanwaar wordt er naar dit bestand verwezen?
Deze link media-statements ontbreken in de kloon, en dit is precies waar de regions worden gedefineerd

Instellingen verdwijnen na update

Casus zomer 2016

  • Na een update van een aangepast at_commerce-theme, ben ik veel van die instellingen kwijtgeraakt
  • Klonen van at_commerce naar een nieuwe naam, zodat deze niet wordt bijgewerkt, is geen optie: Die naam kun je niet zomaar wijzigen.
  • Voorlopige oplossing: fresh.css en .at_commerce.info terugzetten uit de backup die voorafgaand aan een update wordt gemaakt.

Casus nov. 2016 (1)

  • Storing: Theme is gereset naar standaard at_commerce-theme. Oa. is all css gereset
  • Wat er gebeurd is: .info-bestand overschreven door standaardversie + fresh.css is verdwenen
  • Oorzaak: Blijkbaar wordt bij een update de complete map herschreven
  • Ik had de rechten vantevoren aangepast (chmod -R u-w *) zodat deze niet bij een update overschreven zouden worden. Lijkt niet te werken.

Casus nov. 2016 (2)

Zelfde als hiervoor. Ik dacht dat ik de rechten correct had aangepast, en drush up draaide niet met root-rechten.

Practische oplossing: In map /themes/all/at_commerce_bu staan de bestanden die teruggezet moeten worden, in de juiste submappen. Terugzetten gaat zo:

cd sites/themes/all/at_commerce_bu
cp -r * ..
drush cc all

Wat dat laatste betreft: Waarschijnlijk zijn er minder dramatische opties, bv. drush cc theme-registry, die eveneens werken.

LET OP: Deze methode werket niet goed: The theme registry gebruikt ook de bestanden die in deze backup-map staan. Dat maakt debuggen nogal lastig.

Casus nov. 2016 (3)

Het lijkt me dat ik het probleem zou kunnen verhelpen door de rechten op de bestanden aan te passen. Toch wil dat tot op heden niet lukken. Nu in detail:

drwx---r-x 4 strompf strompf 4,0K sep  3 17:34 ./
drwx---r-x 5 strompf strompf 4,0K jul  9 16:14 ../
drwx---r-x 5 strompf strompf 4,0K jul 26 18:08 adaptivetheme/
drwxr-xr-x 6 strompf strompf 4,0K sep  3 17:46 at_commerce/
-rwx---r-x 1 strompf strompf 1020 jul 22 20:03 README.txt*
-rwx---r-x 1 strompf strompf 664K jul 26 18:07 themes.zip*
strompf@dvb1:/var/www/example.com/sites/all/themes$ chmod -R ugo-w at_commerce/
strompf@dvb1:/var/www/example.com/sites/all/themes$ ll
total 684K
drwx---r-x 4 strompf strompf 4,0K sep  3 17:34 ./
drwx---r-x 5 strompf strompf 4,0K jul  9 16:14 ../
drwx---r-x 5 strompf strompf 4,0K jul 26 18:08 adaptivetheme/
dr-xr-xr-x 6 strompf strompf 4,0K sep  3 17:46 at_commerce/
-rwx---r-x 1 strompf strompf 1020 jul 22 20:03 README.txt*
-rwx---r-x 1 strompf strompf 664K jul 26 18:07 themes.zip*
strompf@dvb1:/var/www/example.com/sites/all/themes$ cd at_commerce && ll
dr-xr-xr-x 6 strompf strompf 4,0K sep  3 17:46 ./
drwx---r-x 4 strompf strompf 4,0K sep  3 17:34 ../
-r--r--r-- 1 strompf strompf  18K sep  3 17:46 at_commerce.info
dr-xr-xr-x 2 strompf strompf 4,0K jul 11 12:32 color/
dr-xr-xr-x 4 strompf strompf 4,0K sep 18 16:45 css/
-r-xr-xr-x 1 strompf strompf 1,4K sep  3 17:46 favicon.ico*
-r-x---r-x 1 strompf strompf  182 sep  3 17:46 hoekje10.png*
-r-x---r-x 1 strompf strompf   79 sep  3 17:46 hoekje-10x10.gif*
-r-x---r-x 1 strompf strompf  857 sep  3 17:46 hoekje.gif*
-r--r--r-- 1 strompf strompf  18K sep  3 17:46 LICENSE.txt
-r-xr-xr-x 1 strompf strompf  53K sep  3 17:46 logo.png*
-r-xr-xr-x 1 strompf strompf 3,6K sep  3 17:46 README.txt*
-r-xr-xr-x 1 strompf strompf  56K sep  3 17:46 screenshot.png*
dr-xr-xr-x 2 strompf strompf 4,0K jul 11 12:32 scripts/
-r-xr-xr-x 1 strompf strompf  14K sep  3 17:46 template.php*
dr-xr-xr-x 3 strompf strompf 4,0K sep  3 17:46 templates/
-r-xr-xr-x 1 strompf strompf  13K sep  3 17:46 theme-settings.php*

Nu is alles niet-beschrijfbaar, en zou je ook niet kunnen updaten...

drush up
Update information last refreshed: Thu, 11/24/2016 - 15:56
 Name                           Installed Version  Proposed version  Message                   
 Drupal                         7.50               7.52              SECURITY UPDATE available 
 Chaos tools (ctools)           7.x-1.10           7.x-1.12          Update available          
 Entity API (entity)            7.x-1.7            7.x-1.8           Update available          
 Views megarow (views_megarow)  7.x-1.6            7.x-1.7           Update available          
 AT Commerce (at_commerce)      7.x-3.1            7.x-3.2           Update available          


NOTE: A security update for the Drupal core is available.
Drupal core will be updated after all of the non-core projects are updated.

Code updates will be made to the following projects: Chaos tool suite (ctools) [ctools-7.x-1.12], Entity API [entity-7.x-1.8], Views Megarow [views_megarow-7.x-1.7], AT Commerce [at_commerce-7.x-3.2]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project ctools was updated successfully. Installed version is now 7.x-1.12.
Backups were saved into the directory /home/strompf/drush-backups/example.com/20161124145615/modules/ctools.                                                                                                             [ok]
Project entity was updated successfully. Installed version is now 7.x-1.8.
Backups were saved into the directory /home/strompf/drush-backups/example.com/20161124145615/modules/entity.                                                                                                             [ok]
Project views_megarow was updated successfully. Installed version is now 7.x-1.7.
Backups were saved into the directory /home/strompf/drush-backups/example.com/20161124145615/modules/views_megarow.                                                                                                      [ok]
Project at_commerce was updated successfully. Installed version is now 7.x-3.2.
Backups were saved into the directory /home/strompf/drush-backups/example.com/20161124145615/themes/at_commerce.                                                                                                         [ok]

Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Project drupal was updated successfully. Installed version is now 7.52.
Backups were saved into the directory /home/strompf/drush-backups/example.com/20161124145615/drupal.                                                                                                                     [ok]
4 byte UTF-8 for mysql is disabled. See the documentation on adding 4 byte UTF-8 support for more information. (Currently using Database 4 byte UTF-8 support Disabled)                                               [warning]
 System  7081  Remove the Drupal 6 default install profile if it is still in the database.  
 Dblog   7003  Account for possible legacy systems where dblog was not installed.
Do you wish to run all pending updates? (y/n): y
4 byte UTF-8 for mysql is disabled. See the documentation on adding 4 byte UTF-8 support for more information. (Currently using Database 4 byte UTF-8 support Disabled)                                               [warning]
Performed update: 
dblog_update_7003                                                                                                                                                                                   [ok]
Performed update: system_update_7081                                                                                                                                                                                  [ok]
'all' cache was cleared.                                                                                                                                                                                              [success]
Finished performing updates.                           

...Helaas: De theme-bestanden zijn wel degelijk aangepast. Zie de timestamp van dit bestand:

-rw-r--r-- 1 strompf strompf  18K nov 24 16:00 at_commerce.info

Ik pas toch weer de methode toe met de backup in een aparte map, die ik na een update terugschrijf.

One or more CSS files were not found

Zie ook

Bronnen