Quantcast
Channel: Dirty Motherfucking Blog » php
Viewing all articles
Browse latest Browse all 6

Safely updating TYPO3 extensions

$
0
0

A difference between the originally installed version and the current was detected!

If you have ever read that warning in the TYPO3 extension manager, you know exactly how annoying it can be to find that difference.

You made some minor tweak or fix and forgot about it and now you don’t know what it was and if the updated extension contains the same fix.

Or even worse. You’re already up to the new extension manager interface where there are neither upload comments nor the warning about local modification. Oh boy, oh boy.

So what can you do? Here’s what.

To do this, we need 3 scripts from the typo3scripts script suite.

  1. extUpdate.sh
  2. extChangelog.sh
  3. extExtract.php

How to install and configure these scripts is explained on their respective wiki pages on the project homepage, so I won’t repeat that here. Let’s get right to the interesting parts.

$ ./extUpdate.sh
Sourcing script configuration from typo3scripts.conf...Done.
Checking dependencies...Succeeded.
New version of 'direct_mail' available. Installed: 2.6.10 Latest: 2.7.0
New version of 'div2007' available. Installed: 0.7.2 Latest: 0.8.1
New version of 'kb_md5fepw' available. Installed: 0.4.0 Latest: 0.4.1
New version of 'realurl' available. Installed: 1.12.0 Latest: 1.12.1

First of all, let’s see the upload comments for those extensions:

./extUpdate.sh --changelog
Sourcing script configuration from typo3scripts.conf...Done.
Checking dependencies...Succeeded.
New version of 'direct_mail' available. Installed: 2.6.10 Latest: 2.7.0
2.7.0 (2012-01-30 00:44:37)
 - layout tweaking
 - create draft newsletter and auto sending (e.g. weekly) (thanks to Benni Mack)
 - bug fixes
 please refer to changelog for further info.
 please report any bug or feature or anything in Forge (forge.typo3.org)

New version of 'div2007' available. Installed: 0.7.2 Latest: 0.8.1
0.8.0 (2012-01-23 21:19:28)
 add new classes for email and error message generation
 ready for TYPO3 4.6
0.8.1 (2012-01-28 18:10:45)
 allow the usage of a pibase object instead of class.tx_div2007_alpha_language_base

New version of 'kb_md5fepw' available. Installed: 0.4.0 Latest: 0.4.1
0.4.1 (2010-10-27 21:04:19)
 DEPRECATED: Use "saltedpasswords" and "rsaauth" extensions instead!

New version of 'realurl' available. Installed: 1.12.0 Latest: 1.12.1
1.12.1 (2012-02-17 13:23:27)
 Bug fixes. This is a recommended update to everybody.

Great! Now we even know that kb_md5fepw is deprecated. The extension manager doesn’t list deprecated extensions in the update panel as it seems. Oh well, let’s have a look at those local modifications that keep us from updating our extension.

$ ./extExtract.php direct_mail
Sourcing script configuration from typo3scripts.conf...Done.
NOTE: New version available!
Retrieving original extension file for 'direct_mail' 2.6.10...Done.
Extracting file 'direct_mail_2.6.10.t3x'...Done.
$ diff --recursive direct_mail_2.6.10.t3x-extracted/ typo3/typo3conf/ext/direct_mail
diff --recursive direct_mail_2.6.10.t3x-extracted//ext_tables.php typo3/typo3conf/ext/direct_mail/ext_tables.php
100c100
<                       )
---
>                       ),
diff --recursive direct_mail_2.6.10.t3x-extracted//mod2/class.tx_directmail_dmail.php typo3/typo3conf/ext/direct_mail/mod2/class.tx_directmail_dmail.php
421c421
<                       if (t3lib_div::testInt($createMailFrom_UID))    {
---
>                       if (t3lib_div::testInt($createMailFrom_UID) && $createMailFrom_UID > 0) {
diff --recursive direct_mail_2.6.10.t3x-extracted//mod4/class.tx_directmail_statistics.php typo3/typo3conf/ext/direct_mail/mod4/class.tx_directmail_statistics.php
439c439
<                               ' AND type=0'.
---
>                               ' AND (type=0 OR type=1)'.
diff --recursive direct_mail_2.6.10.t3x-extracted//res/scripts/class.tx_directmail_checkjumpurl.php typo3/typo3conf/ext/direct_mail/res/scripts/class.tx_directmail_checkjumpurl.php
132c132
<                                                       $jumpurl = str_replace('###SYS_TABLE_NAME###', $theTable, $jumpurl);
---
>                                                       $jumpurl = str_replace('###SYS_TABLE_NAME###', substr($theTable, 0, 1), $jumpurl);

Well, I don’t know what those changes do (actually, I totally do), but I better make sure I put them back after the update.


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images