1

I have created my own module. Within my module I have used the Joomla! subform which allows me to create repeatable fields using a separate XML file.

If I look at my module I see an error:

JForm::getInstance could not load file

When I use FTP to check, there is no XML file on the server. So the file is not being uploaded with my installation. I am lead to believe I can leave the XML file in the main folder and not name it anywhere in my main XML file.

Even so, since it is not working I have tried adding the file to the main XML file using:

<filename>repeatablefieldmap.xml</filename>

That didn't work. I then tried creating a folder called XML and loading

<folder>xml</folder>

Again, FTP shows no uploaded folder or file.

If I upload the file manually via FTP the module works, so it is purely a file upload issue I am facing. I'm pretty inexperienced, does anyone know why this might be? My personal thoughts at this stage are that possibly Joomla! blocks the upload of XML files except the main one, but that seems unlikely.

2 Answers 2

2
  1. The manifest (main xml) is the only file that doesn't need to be included in the manifest (ie itself). Other xml files need to be listed either as files or be in listed folders.
  2. One attribute in the manifest is the "method" which can be set to 'install' or 'upgrade' with install as default. If you attempt to reinstall your module over the top of your existing module and the method attribute in the manifest is not 'upgrade' then it won't add or overwrite any files.
1
  • It turns out that is was server or admin cache. Using Regular Labs cache cleaner to clean the admin solved it. I also uninstalled and reinstalled it
    – Eoin
    Commented Dec 2, 2017 at 13:56
0

I can't remember the solution but in case it helps someone:

  • I either misspelt the subform item
  • I had the wrong plugin/module name/directory in the subform item

So in the last version the XML was possibly uploading but to the wrong place and then being referenced from the wrong place.

I did say it was admin cache, but looking back I can't believe that was true. In any case Regular Labs Cache Cleaner can clear admin cache too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.