Giter Club home page Giter Club logo

Comments (10)

IchHabRecht avatar IchHabRecht commented on August 24, 2024

Hi @linawolf,

Thank you for your ticket. Site configurations are already supported since version 3.2.0 (c6c93fc)

from filefill.

linawolf avatar linawolf commented on August 24, 2024

Do we already have it in the documentation?

from filefill.

IchHabRecht avatar IchHabRecht commented on August 24, 2024

Hi @linawolf,

I'm not sure what your expectations are, so please feel free to submit any improvement.

from filefill.

linawolf avatar linawolf commented on August 24, 2024

So the example in de Readme.md says:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['filefill']['storages'][1] = [
    [
        'identifier' => 'domain',
        'configuration' => 'https://example.com',
    ],
    [
        'identifier' => 'domain',
        'configuration' => 'https://another-example.com',
    ],
    [
        'identifier' => 'sys_domain',
    ],
    [
        'identifier' => 'placeholder',
    ],
];

Now how can I use the site_configuration instead of sys_domain?
will
[
'identifier' => 'sys_domain',
],
just work with the site_configuration as well? Then I would put a sentence like sys_domain also works with site_config since version 3.2.0 ...

Is it another then i would put it in the example. Is there a list of all possible idenitifiers somewhere or just in the code?

from filefill.

IchHabRecht avatar IchHabRecht commented on August 24, 2024

Just use 'sys_domain' as it is only an identifier.

from filefill.

linawolf avatar linawolf commented on August 24, 2024

I made a pull request to update the documentation:
#28

However i find it counter-intuitive that while site_configuration was introduce with TYPO3 9 (https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/ApiOverview/SiteHandling/Index.html)

filefill does not repect it below Version 10 (see https://github.com/IchHabRecht/filefill/blob/3.x/Classes/Repository/DomainResourceRepository.php line 32) I would expect filefill to either respect both possible availible siteconfigurations and sys_domain entries or have it configureable ie one identifier for sys_domain and another for site_configuration.

from filefill.

IchHabRecht avatar IchHabRecht commented on August 24, 2024

Hi @linawolf,

To be honest I don't understand your remark. I'm trying hard to support as many TYPO3 versions as I can and filefill 3.x is compatible from TYPO3 8.7 to 10.4

If you have any expectations in some open source software you are always more than welcome to contribute and help to improve!

from filefill.

linawolf avatar linawolf commented on August 24, 2024

@IchHabRecht You are doing a great job, never wanted to question this.

I am sorry if I misinterpreted the code, however in line 31 of DomainResourceRepository.php (https://github.com/IchHabRecht/filefill/blob/3.x/Classes/Repository/DomainResourceRepository.php)

is found the following:

        if (version_compare(TYPO3_version, '10', '<')) {
            return $this->findAllBySysDomainRecords();
        }

        return $this->findAllBySiteConfiguration();

So if the version is 9 findAllBySysDomainRecords() would be returned imidetly and findAllBySiteConfiguration() will never be called. Not sure if this is a bug or a missing feature. But to me using LTS 9 with filefill 3.2.0 the site configuration does not get considered.

After patching DomainResource Repository to change these lines to

  public function findAll()
   {
       $domainResources = [];
       if (version_compare(TYPO3_version, '10', '<')) {
           $domainResources = $this->findAllBySysDomainRecords();
       }
       if (version_compare(TYPO3_version, '8', '>')) {
           $domainResources =  array_merge ($domainResources, $this->findAllBySiteConfiguration());
       }

       return $domainResources;
   }

it worked like charm for me.
You can find my patch attached:

site_conf_lts9.zip

from filefill.

IchHabRecht avatar IchHabRecht commented on August 24, 2024

Hi @linawolf,

I didn't remembered I implemented the site configuration that way. I took some time on the weekend and released a new filefill version that should solve your problem and support site configuration in TYPO3 9.5 as well.
Additionally I added a hint to the README file.

from filefill.

linawolf avatar linawolf commented on August 24, 2024

Hi @IchHabRecht,

Wonderfull, thanks a lot!

Have a nice week!

from filefill.

Related Issues (20)

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.