Closed tobiasschaeferptb closed 6 years ago
I just noticed that the diffs aren't shown in TYPO3 8.7.4 with additional_reports 3.1.0 anymore since the class TYPO3\CMS\Core\Utility\DiffUtility sets the variable $stripTags by default to true. To fix this I added $diff->stripTags = false; in additional_reports/Classes/Eid/class.tx_compareFiles_eID.php: function t3Diff($file1, $file2) { $diff = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\Utility\DiffUtility'); if (version_compare(TYPO3_version, '7.6.0', '>=')) { // BugFix for not showing the diff $diff->stripTags = false; $sourcesDiff = $diff->makeDiffDisplay($file1, $file2); } else { $diff->diffOptions = '-bu'; $sourcesDiff = $diff->getDiff($file1, $file2); } printT3Diff($sourcesDiff); }
Since the name of the subdirectory could start with typo3 I guess the code should be: if (strpos($uri, 'typo3/index.php') > 0) { $uri = substr($uri, strpos($uri, 'typo3/index.php')); }
Thanks for you feedback, look a the 3.1.1 version to test the fix.
Thank you for the fix. The comparison feature works now.
In Main.php in line 233 it should be: $uri = substr($uri, strpos($uri, 'typo3/index.php')); instead of: $uri = substr($uri, strpos($uri, 'typo3'));
Oops fixed in git version :-) I will wait a little bit to push another typo3 ter version.
Hello,
if TYPO3 is installed in a subdirectory the url for the comparison is wrong because the subdirectory occurs in the url twice. If you click on the compare button it leeds to an 404 error. I fixed this by changing the function getExtensionInformations in Classes/mail.php a little bit: public static function getExtensionInformations($itemValue) { $extKey = $itemValue['extkey']; $listExtensionsTerItem = array(); $listExtensionsTerItem['icon'] = $itemValue['icon']; $listExtensionsTerItem['extension'] = $extKey; $listExtensionsTerItem['version'] = $itemValue['EM_CONF']['version']; $listExtensionsTerItem['versioncheck'] = \Sng\AdditionalReports\Utility::versionCompare($itemValue['EM_CONF']['constraints']['depends']['typo3']);
Cheers, Tobias