Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Invalid file provided for module import!
#1
Hi all

I'm getting the error "Invalid file provided for module import! Try Again." if I want to import my custom module via file upload in the Module Manager.

When I first export a module into a zip-file and re-import it, it's working fine. But when I change in this package only the name of the module in the manifest.xml I get this error.

I also imported the custom module cbReportico (https://github.com/tsolucio/coreBOSReportico/find/master) sucessfully but my own module only with the modul name changed doesn't work.

Any idea what's wrong here?
Reply
#2
you can't just change the name in the manifest.xml file, you also have to change the table names, the files in the modules directory that have the same name and all references in the header of the main module file.

keep asking...

and maybe tell us what you are trying to achieve, as it may already be done or doable....
Joe
TSolucio
Reply
#3
(08-05-2016, 01:54 PM)joebordes Wrote: you can't just change the name in the manifest.xml file, you also have to change the table names, the files in the modules directory that have the same name and all references in the header of the main module file.

keep asking...

and maybe tell us what you are trying to achieve, as it may already be done or doable....


OK, I thought there is something wrong with the files itself like CR/LF problem or wrong ZIP-format…


Finally I created a new module successfully.
These module has a 1:m relation to the ServiceContracts module (one ServiceContract can have many records of the new module). In this new module I want to store data delivered by an external interface.

Now I have some more problems:
-          As far I understand, I have to tell the ServiceContracts Module that there is an other modul pointing to it, so that a link to this new module can be added. But how I can update an non custom-module?
-          When I am adding an link to a ServiceContract in the new Module, I get the error
Fatal error: Uncaught exception 'Exception' with message 'result is not an object' in /u/web/pocswi/www/cc_crm/include/database/PearDatabase.php:789 Stack trace: #0 /u/web/pocswi/www/cc_crm/Popup.php(399): PearDatabase->query_result(false, 0, 'count') #1 /u/web/pocswi/www/cc_crm/modules/ServiceContracts/Popup.php(10): require_once('/u/web/pocswi/w...') #2 /u/web/pocswi/www/cc_crm/index.php(674): include('/u/web/pocswi/w...') #3 {main} thrown in /u/web/pocswi/www/cc_crm/include/database/PearDatabase.php on line 789
Is this because of the missing declaration in the ServiceContracts Module?
 
Thanks for your help!
 
Regards
Andreas


Attached Files
.zip   CycleCounter (10).zip (Size: 35.97 KB / Downloads: 0)
Reply
#4
Look at this code for an example:
The coreBOS Address module permits you to have multiple addresses on Accounts and Contacts. When it is installed it adds fields and related lists to these modules, as one Account can have many Addresses much like ServiceContracts has many CycleCounter.

vtlib_handler is called on install of the module:
https://github.com/tsolucio/coreBOSAddress/blob/master/modules/cbAddress/cbAddress.php#L494

here we get a reference to another module (be it custom or not)
https://github.com/tsolucio/coreBOSAddress/blob/master/modules/cbAddress/cbAddress.php#L504

here we set the related list:
https://github.com/tsolucio/coreBOSAddress/blob/master/modules/cbAddress/cbAddress.php#L507

and below we do some additional magic.

have a look at that and keep asking
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)