extension_builder icon indicating copy to clipboard operation
extension_builder copied to clipboard

🐛 [BUG] Fetching Extension list failed

Open PKuhlmay opened this issue 1 year ago • 18 comments

In #667 an error is mentioned: Fetching the extensions failed. Please check, if you have extensions with a valid extensionbuilder.json file.

PKuhlmay avatar Dec 21 '23 12:12 PKuhlmay

Hi @hgalt. I cannot reproduce this issue. Could you provide some more information about this? Maybe screenshots, where is the extension installed. Is a ExtensionBuilder.json file available in the extensions root directory? What PHP are you using?

You can also send me a zip of the extension you created via Slack (Nickname: treupo)

PKuhlmay avatar Dec 21 '23 13:12 PKuhlmay

grafik What you see are the extensions I have currently in the typo3/ext! The 3 are started with 'hga' are some old extension of me. 'testext' ia an exension I have created wit the current version of the extension_builder! This is the screenshoot after I have open the extension_builder and have pressed 'open' button next to the green 'Save' button. So I cannot open the extension created with the current version of extension_builder and also not my older extensions, which was also created with an older version of extension_builder. grafik

testext.zip

hgalt avatar Dec 21 '23 14:12 hgalt

@hgalt Okay thanks, I need to test this. I only have a composer installation running at the moment. Your installation seems to be a legacy one. I will have a look at it soon.

PKuhlmay avatar Dec 21 '23 16:12 PKuhlmay

@PKuhlmay yes I have a lagacy installation.

hgalt avatar Dec 22 '23 08:12 hgalt

@PKuhlmay grafik The $storagePath is empty! Configuration\ExtensionBuilderConfigurationManager.php I use mklink for index.php!

hgalt avatar Jan 06 '24 10:01 hgalt

grafik It seems to be also to be a problem with the getExtensionBuilderConfiguration function. The variable $storagePath in this function is null, but send to it. Could it behave something to do with PHP 8?

hgalt avatar Jan 06 '24 12:01 hgalt

Hi @hgalt Thank you very much for the screenshots. This should help a lot. It could be something with PHP 8 but I am not sure. I haven't set up a legacy installation yet, only composer. I don't have too much time at the moment

PKuhlmay avatar Jan 07 '24 09:01 PKuhlmay

Hi @PKuhlmay maybe it is not necessary that you set up a legayy installation. I can support you, if you tell me what I have to do/test. I do a lot with PHP,but I am not a TYPO3 specialist. Let's work together!

hgalt avatar Jan 07 '24 09:01 hgalt

Hi @PKuhlmay

hgalt avatar Jan 07 '24 15:01 hgalt

Hi @PKuhlmay please ignore my 2 messages with the images. I used wrong error_log! I think the problem has noting to do with PHP8 or the lagacy installation! There is problem in the ExtensionBuilderConfigurationManager in the function mapAdvanced Mode. On the beginning the is an array

   $fieldsToMap = [
        'relationType',
        'renderType',
        'propertyIsExcludeField',
        'propertyIsExcludeField',
        'lazyLoading',
        'relationDescription',
        'foreignRelationClass'
    ];

And in one of my extension there is the follöwing part

  'relationGroup' => array (
      'relations' => 
      array (
        0 => 
        array (
          'foreignRelationClass' => '',
          'lazyLoading' => false,
          'propertyIsExcludeField' => true,
          'relationDescription' => '',
          'relationName' => 'habit',
          'relationType' => 'zeroToOne',
          'relationWire' => '[wired]',
          'uid' => '1353817689744',
        ),

But there is no value renderType! So in the foreach loop of $fieldsToMap a error occurs and the program will be aborted! But no PHP error is generated! My suggestion would be, to add a default value to the $fielsToMap array and check inside the foreach lopp if a value exists and if not to write the default value. Could you provide me with the default values, so I'm able to test it! But there is als another problem with the $fieldsToMap array. The value propertyIsExclude Field is double and I don't know if it possible just to delete this double value or is another value missing! If you can provide me the info, I could also change it with GitHub. But I don't currentlydo not know, how you use it? Is typo3-12-reactsjs your working branch?

In ExtensionBuilderConfigurationManager.php on the end of the function getExtensionBuilderJson a : ?array is missing!

It's up to you how we should continue.

hgalt avatar Jan 07 '24 16:01 hgalt

Hi @PKuhlmay , It looks like, that I would need a username and a password to download it via Github.

hgalt avatar Jan 07 '24 16:01 hgalt

Same problem here. With an ext for TYPO3 8.7 no ext will be found. Exts for 11 and 12 can be selected.

ste101 avatar Jan 09 '24 21:01 ste101

@ste101 Just to be clear and to be sure if I understand you correctly, you want to load an extension into the new TYPO3 12 version which you created in TYPO3 8? This is not officially supported.

PKuhlmay avatar Jan 10 '24 08:01 PKuhlmay

if a combination like that can be even installed without any code changes, then there'd be a fundamental flaw, but I can't imagine that it's usually even possible.

DavidBruchmann avatar Jan 10 '24 08:01 DavidBruchmann

If there is an older EXT even not installed the extension_builder does not find any EXT. For me this is an error.

I would like to open an older EXT in the latest extension_builder and then save it again to make it compatible with e.g. Version 12. This worked always till the latest version I think.

Or think about an older EXT which was updated manual or via Rector an still has the original ExtensionBuilder.json.

ste101 avatar Jan 10 '24 12:01 ste101

Loading an extension from (at least) v10 worked for me. Only the modules are missing, because of the missing information in the JSON file, which are added in TYPO3 12. When saving, all the classes etc are removed, because of the missing modules in the React Flow component.

It could be possible to open older extensions, but for that, all the missing information must be generated while opening the extensions. This could be an issue for the future.

PKuhlmay avatar Jan 10 '24 13:01 PKuhlmay

But why are the modules missing. I can't see much difference within the ExtensionBuilder.json. Creating the module is the biggest part in creating an EXT.

So it is nearly unusable to update an older EXT.

ste101 avatar Jan 11 '24 17:01 ste101

Because the whole UI changed and it was not possible to load the required nodes (which are used inside the React Flow component) with the information from the ExtensionBuilder.json file. Therefore there is a new array inside the .json file which contains all the information.

You can always upgrade an extension with Rector, which is recommended.

PKuhlmay avatar Jan 11 '24 18:01 PKuhlmay