Review main Merged

29468[BUGFIX] Fix relative path resolution in include static

Markus Klein CR +2 V +2 Easy +37 −10 updated 05/22/14, 12:10

Commit message

Fix the usage of relative paths in INCLUDE_TYPOSCRIPT inclusions of
static templates from extensions.

EXT:myext/Configuration/TypoScript/setup.txt:
<INCLUDE_TYPOSCRIPT: source="DIR:./Setup/">

EXT:myext/Configuration/TypoScript/Setup/ holds some TS files.

Review

  • Code review CR +2
    • Markus Klein +2
    • Stefan Neufeind +1
    • Jan Kiesewetter +1
    • Wouter Wolters +1
  • Verified V +2
    • Markus Klein +2
    • Jan Kiesewetter +1
    • Wouter Wolters +1

Issues 1

Files 2

Review log 23

  1. Markus Klein uploaded patch set 2 04/14/14, 23:04

  2. Mr. Jenkins commented on patch set 1 04/14/14, 23:16

  3. Mr. Jenkins commented on patch set 2 04/14/14, 23:19

  4. Stefan Neufeind commented on patch set 2 CR +1 04/14/14, 23:21

    Looks okay on first reading - needs testing.
  5. Markus Klein commented on patch set 2 04/15/14, 00:31

    I'm running this on a live-site already.
  6. Xavier Perseguers voted on patch set 2 CR +1 04/15/14, 11:07

  7. Frans Saris voted on patch set 2 V +1 04/16/14, 12:01

  8. Wouter Wolters commented on patch set 2 V -1 04/16/14, 18:06

    extensionStaticsAreProcessedIfExplicitlyRequested fails for me with 1) TYPO3\CMS\Core\Tests\Unit\TypoScript\TemplateServiceTest::extensionStaticsAreProcessedIfExplicitlyRequested BadFunctionCallException: TYPO3 Fatal Error: Extension key "test534ec6473a112" is NOT loaded!
  9. Frans Saris voted on patch set 2 V 0 04/16/14, 18:15

  10. Frans Saris commented on patch set 2 04/16/14, 18:15

    1 unit test fails here to
  11. Markus Klein commented on patch set 2 04/16/14, 21:41

    Strange since I ran the unit tests. Maybe something else changed in the meanwhile on master. Will retry and will push an new version.
  12. Markus Klein commented on patch set 2 04/16/14, 22:21

    Ok, this is a problem of mocking. The test fakes the $GLOBALS['TYPO3_LOADED_EXT'] array with a random dummy extension. But the new code now calls ExtensionManagementUtility::extPath(), which checks against PackageManager. Of course the PackageManager does not know about the dummy extension.
  13. Markus Klein uploaded patch set 3 04/16/14, 22:36

  14. Markus Klein commented on patch set 3 04/16/14, 22:38

    Fixed failing test.
  15. Mr. Jenkins commented on patch set 3 04/16/14, 22:51

  16. Stefan Neufeind commented on patch set 3 CR +1 04/22/14, 19:06

    TemplateService.php:630

    not just useful with static_includes imho, therefor I think we could simply drop the end of this description.
  17. Wouter Wolters voted on patch set 3 V +1 CR +1 04/22/14, 19:21

  18. Helmut Hummel commented on patch set 3 04/24/14, 09:59

    This is not straight forward. I'm fine getting this in, but I prefer to not merge it in the regression fix release, to not break something else again. afaik relative paths were never documented to work, were they?
  19. Markus Klein commented on patch set 3 04/24/14, 12:32

    @Helmut: http://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/Syntax/Includes/Index.html "Since TYPO3 6.2 also paths relative to the including file can be passed to INCLUDE_TYPOSCRIPT, if the inclusion is called from inside a file. These paths start with "./" or "../". The "./" is needed to distinguish them from paths relative to PATH_SITE. This mechanism allows simple, nested TypoScript templates that can be moved or copied without the need to adapt all includes." This is a MAJOR feature of 6.2 and really a big advantage. One of the things that really ease things for integrators. (UX)
  20. Markus Klein commented on patch set 3 05/06/14, 10:21

    PING! Missing only one v+1
  21. Jan Kiesewetter commented on patch set 3 V +1 CR +1 05/06/14, 19:13

    Works in my environment, but I don't run unit tests.
  22. Markus Klein voted on patch set 3 V +2 CR +2 05/22/14, 12:10

  23. Markus Klein merged patch set 4 05/22/14, 12:10