Git Product home page Git Product logo

autoloader's Introduction

Hi there 👋

My name is Tim and I am a PHP backend developer working for HDNET in Werther, Germany.

Some facts...

  • 🔭 I’m currently working on TYPO3 Extensions.
  • 🌱 I’m currently learning A-Frame.io for VR features.
  • 🤔 I’m looking for help with game design in TypeScript/A-Frame.io.
  • 💬 Ask me anything about TYPO3.
  • 📫 Your reach me via GitHub.
  • ⚡ Fun fact: I love playing games in the garden -> My Games

autoloader's People

Contributors

cabi avatar cietho avatar datamints-off avatar diologenes avatar escapevisual avatar fduarte42 avatar florianpat avatar hdnetmaxamann avatar helhum avatar lochmueller avatar markusehrlich avatar mbrodala avatar mediaessenz avatar monsieurbenny avatar mschwemer avatar okmiim avatar orangehive avatar pniederlag avatar reneroboter avatar schmdt avatar sirdiego avatar sypets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

autoloader's Issues

[BUG] Could not load layout file. (TYPO3 6.2 only problem?)

Hey,

I'm getting exceptions for the page module previews, since the ext:autoloader generates automatically the layout files.

#1288092555: Could not load layout file. Tried following paths: "typo3conf/ext/provider/Resources/Private/Layouts/ContentBackend.html", "typo3conf/ext/provider/Resources/Private/Layouts/ContentBackend". (http://typo3.org/go/exception/CMS/debug/1288092555)

TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException thrown in file
/docker/code/typo3_src-6.2.15/typo3/sysext/fluid/Classes/View/StandaloneView.php in line 410.

My actual workaround
Don't using a layout for backend previews. 😢

ext:autoloader deletes whole content of locallang.xlf and didn't create a new one (result is an exception)

Everytime I recreate the file, the exception occurs after actuating "Flush system caches"


#1278155988: The path provided does not point to existing and accessible well-formed XML file. More information
TYPO3\CMS\Core\Localization\Exception\InvalidXmlFileException thrown in file
/docker/code/typo3_src/typo3/sysext/core/Classes/Localization/Parser/AbstractXmlParser.php in line 99.


TYPO3 version: 6.2.15
Autoloader version: 1.9.1


It seems like the problem don't occur when I clear the autoloader cache via TYPO3 backend and all strings for tt_content.content_element_nameand tt_content.content_element_name.description are present.
But I'm surprised that it is now necessary to add this in addition to the newly introduced strings wizard.content_element_name.description, wizard.content_element_name.

Deleting class loading information in clear cache hook should be removed

What is the purpose of these lines here?
https://github.com/lochmueller/autoloader/blob/master/Classes/Hooks/ClearCache.php#L65-L70

Removing these files can have weird side effects and should be avoided at all costs.

Instead the class loading information should be re-generated if required.
The API for that is pretty simple: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/extensionmanager/Classes/Command/ExtensionCommandController.php#L95

Add composer.json

The extension currently doesn't have a composer.json which makes it impossible to pull e.g. the latest master via Composer, please add one. I'd suggest lochmueller/autoloader as package name. ;-)

Start and end time of events become 4 hours less after saving

Under TYPO3 Version 8.7.0, start and end time of events become 4 hours less after saving.

If I e.g. enter 00:00 into field "start time", it becomes 20:00 after pressing save.
If I press the save button again, it become 18:00 (2 hours less), next time 16:00 and so on.

The problem also exists at the datetime field "start" under tab "access" of calendar records,
but neither in records of other extensions e.g. news nor in content elements.

I thing the problem stock somewhere inside the IndexPreperationService method prepareRecordForDatabase.
If I e.g. enter 00:00 into start time field and press save, this value becomes 1491422400 inside $record['start_time'], which correspond to 05.04.2017 22:00:00 in local time and 05.04.2017 20:00:00 in utc. Apart of the date this ist exactly the value I see after page reloads.

I thing in general, the value of "start_time" and "end_time" should not be greater than 86400 (because time) at this place. But if I look in the database table "tx_calendarize_domain_model_index", all values are greater, beside some "end_date" values, which I leave empty.
If I look into the database of an other TYPO3 installation, but Version 7.6, all values are smaller than 86400.

icons of content objects not loaded in backend under 6.2

After some debugging I found a solution:
Change this in /Classes/Loader/ContentObjects.php line 263:

SpriteManager::addTcaTypeIcon('tt_content', $typeKey, str_replace('../', '', $icon));

to this:

SpriteManager::addTcaTypeIcon('tt_content', $typeKey, str_replace('../typo3/', '', $icon));

May be this path must be different under 7.x. In this case a condition will help.

Add locallang/language override loader

It would be nice to have a autoloader for locallang/language overrides.

Normally one must add something like this in the ext_localconf.php:

$TYPO3_CONF_VARS['SYS']['locallangXMLOverride']['default']['EXT:foo/Resources/Private/Language/locallang.xlf'][] = 'EXT:bar/Resources/Private/Language/Path/To/Foo/locallang.xlf';

$TYPO3_CONF_VARS['SYS']['locallangXMLOverride']['de']['EXT:foo/Resources/Private/Language/locallang.xlf'][] = 'EXT:bar/Resources/Private/Language/Path/To/Foo/de.locallang.xlf';

I'd suggest that language overrides must be placed in Resources/Private/Language/Overrides/ExtensionName/original/path/to/locallang.xlf.

With this, the loader could deduce the extension name via GeneralUtility::camelCaseToLowerCaseUnderscored() and use the path after Resources/Private/Language/Overrides/ExtensionName/ for the original file path. The language key could be taken from the file prefix of XLIFF files. Examples:

  • Resources/Private/Language/Overrides/FooBar/mod1/locallang_mod.xlf yields
    $TYPO3_CONF_VARS['SYS']['locallangXMLOverride']['default']['EXT:foo_bar/mod1/locallang_mod.xlf'][] = 'EXT:my_extension/Resources/Private/Language/Overrides/FooBar/mod1/locallang_mod.xlf';
  • Resources/Private/Language/Overrides/FooBar/mod1/de.locallang_mod.xlf yields
    $TYPO3_CONF_VARS['SYS']['locallangXMLOverride']['de']['EXT:foo_bar/mod1/locallang_mod.xlf'][] = 'EXT:my_extension/Resources/Private/Language/Overrides/FooBar/mod1/de.locallang_mod.xlf';
  • Resources/Private/Language/Overrides/Qux/Resources/Private/Language/locallang.xlf yields
    $TYPO3_CONF_VARS['SYS']['locallangXMLOverride']['de']['EXT:qux/Resources/Private/Language/locallang.xlf'][] = 'EXT:my_extension/Resources/Private/Language/Overrides/Qux/Resources/Private/Language/locallang.xlf';

It could be argued that the last example is unnecessarily verbose but it should be this way for consistency. If at one point in the future every extension sticks to Resources/Private/Language, this could be simplified a lot.

Table 'typo3.tt_conten' doesn't exist

I don't know why, but if I use the content object functionality of autoloader with the 6.2.14 version of TYPO3, I got this SQL-Error in Front- and Backend.

After some debugging, I notice that inside the dynamic generated typoscript from autoloader the last "t" of "tt_content" is missing.

If I look in Classes/Loader/ContentObjects.php at line 345, everything looks good for me.

config.tx_extbase.persistence.classes.' . $config['modelClass'] . '.mapping.tableName = tt_content');

But if I look at the generated typoscript, it looks like this:

config.tx_extbase.persistence.classes.VENDOR\ExtKey\Domain\Model\Content\MyContent.mapping.tableName = tt_conten

Adding a linebreak at the end of Classes/Loader/ContentObjects.php line 345 solve this problem:

config.tx_extbase.persistence.classes.' . $config['modelClass'] . '.mapping.tableName = tt_content
');

Content Objects and FAL translations

Hi Tim

Thank you for your work and this very useful extension!

I stumbled yesterday upon a problem with the translation of FAL records. I've created the content object with the following annotation:

@var \TYPO3\CMS\Extbase\Domain\Model\FileReference

The TCA part:

'tx_xyz_image' => array( 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image', array( 'appearance' => array( 'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference' ), 'foreign_types' => array( 2 => array( 'showitem' => '--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ) ), 'minitems' => 0, 'maxitems' => 1, ), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']), ),

Maybe i miss something, but i get always the image object from the record from default language.

Thank you.

Best,
René

CType Selectbox content element icon

Actually the provider extension icon is taken as icon for the list within the CType selectbox when editing tt_content record.

In the NCEW the own icon is used (which is present under ext:providerextension/Resources/Public/Icons/Content/FooBar.svg)

Enable cache clearing in production context

We often have troubles with the autoloader cache after deploying new features or after updating the TYPO3 core. The TCA modifications by autoloader aren't loaded and we have to manually clear the autoloader cache.

Is it possible - from your view - to only check if you are an TYPO3 backend admin. Or maybe something advanced like: If main context is production, and actual user is admin and has set an option to enable the clear cache button.

What do you think Tim? Actually I often has these scenarios. How do you prevent such stuff?

autoloader's backendPreview hook is only working if sysext:css_styled_content is installed

Hey Tim,

I wrote you already directly in slack. I couldn't figure out why there is the check if css_styled_content is loaded in ext:autoloader/Classes/Hooks/ElementBackendPreview.php in line 46 -> https://github.com/lochmueller/autoloader/blob/master/Classes/Hooks/ElementBackendPreview.php#L46

With TYPO3 7 css_styled_content isn't a requirement anymore. Therefore this if statement must be removed or extended to check if fluid_styled_content is installed.

JSON-RPC Loader

Hi,
I'm trying to write a JSON-RPC Server Loader, but I have trouble integrating the Zend/Json/Server Library in your Project under the Contrib directory. I changed the composer.json in Contrib and the did a composer update and a composer dumpautoload -o to have a autoload_classmap.php. But know even the SoapServer is not working anymore. Should I do a Pull-Request? I forked the project under fduarte42/autoloader. Do you have any advice?

Kind regards,

Tito

Installing autoloader via composer throws InvalidArgumentException

Hello,
I tried to install autoloader via composer on V 7.6.1 and received the following exception:

[InvalidArgumentException]
Could not find package typo3-ter/autoloader at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability.

Could you give me a feedback, please. Thanks!

Content Object: Wrong icon path in Content/Page overview [Typo3 7.6.15]

Hi,

the icon of content objects is not displayed in the Content/Page overview. Here is an image of the case.

The icon is correctly named and placed - and shown, when I add the content element. In the overview of the content elements, there is added an extra subfolder to the icon link. Here is an example: My Typo3 installation is at http://some.toplevel.domain/some-site/
The generated icon link then is /some-site/some-site/typo3conf/ext/some-extension/Resources/Public/Icons/Content/ContentElement.svg
That is wrong and one subfolder too much.

explicit execution order for slots for more control in signal handling

At the moment slots are registered in a more or less random order (order of class files in the Slots folder) and there is no way to explicitly control the order of execution if there are more than one slot for the same signal. It would be nice to have some kind of priorization (e.g. @priority annotation or something like this).

@enableRichText doesn't work with TYPO3 dev-master/7LTS

Actually ;;;richtext:rte_transform[flag=rte_enabled|mode=ts_css] isn't added to TCA for fields where I annotate it through PHPDoc Block

<?php

namespace Foo\Ccontent\Domain\Model\Content;

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

/**
 * Class TextTeaser
 * @package Foo\Ccontent\Domain\Model\Content
 * @db tt_content
 * @wizardTab common
 */
class TextTeaser extends AbstractEntity
{
    /**
     * @var string
     * @enableRichText
     */
    protected $bodytext;

    /**
     * @return string
     */
    public function getBodytext()
    {
        return $this->bodytext;
    }

    /**
     * @param string $bodytext
     */
    public function setBodytext($bodytext)
    {
        $this->bodytext = $bodytext;
    }
}

[DOCUMENTATION] localization strings overview

It would be nice for new users of the ext to get an overview which prefixes (tt_content, content.element, ...) are for which area in the backend.

When you drop me a short info to every possible, I could write the documentation part with some nice backend screenshots.

Modifying content elements with `addToAllTCAtypes` not possible

I've tried to add a custom palette or an additional field with e.g. \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_content', 'assets', 'ccontent_homepage_slide', ''); without success.

When checking the TCA with the configuration backend module, no additional field is added.

Unable to install version 2 on TYPO3 6.2

I tried to install the extension in a TYPO3 6.2 installation. The extension could not be activated since it requires typo3/cms in the composer.json (BTW the same problem with the faqextension).

compatibility with composer mode

Hi,

we are currently seeing a problem with classes not being available to the autoloader.

  • TYPO3 7.6.5
  • composer based install (web-dir is used, see below)
  • autoloader is required in composer.json
  • custom extension is NOT required in composer.json (we follow monolitic repository approach and
    it is part of our source repo)

  "cms-package-dir": "{$vendor-dir}/typo3/cms",
  "web-dir": "Web/"

So probably the class loaderis somehow "messed up".

Can someone confirm EXT:autoloader is compatible with composer based installs?

I'll dig now to see where it breaks for us and report back here.

Connect slot multiple times

The documentation currently says the following about the Slots loader:

... So it is possible to connect one slot class with many signals.

However, the code leads to believe that only the first annotation pair is used, thus the following won't work:

class MySlot {
  /**
   * @signalClass \Foo\Bar
   * @signalName mySignal
   * @signalClass \Foo\Qux
   * @signalName mySimilarSignal
   */
  public function doSomething() {}
}

Is this actually supported or could this be supported? In any case a code snippet in Documentation/Loader/Slots would be useful.

ContentElement Description not shown, after update to 1.8.0

After updating to 1.8.0 my ContentElements show no Label and/or description, when I try to add a ContentElement to a Page. Only the Icon is shown. When I downgrade to 1.7.0 everthing is working again. I tried the example autoloader_contentobject extension, and it also happens there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.