is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 11 years ago

#967 closed task (fixed)

createapp command should create a default installer.php for the application

Reported by: laurentj Owned by:
Priority: high Milestone: Jelix 1.2 beta
Component: jelix-scripts Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


the title says all

Attachments (4)

jelix-scripts-values-in-installer.ini.php.diff (2.6 KB) - added by catsoup 11 years ago.
jelix-scripts-installer.ini.php.diff (4.9 KB) - added by catsoup 11 years ago.
installer.php.tpl (386 bytes) - added by catsoup 11 years ago.
goes in jelix-scripts/install/templates/
installer.php.2.tpl (361 bytes) - added by catsoup 11 years ago.
this is the good one, removed @subpackage

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by foxmask

the command should also create all the necessary things to "activate" the module in the defaultconfig.ini.php file ; or at least all the things to avoid this :

[exception 12] Unknow module in the selector "test~default:index@classic" 
D:\DOCUMENT_ROOT\www_test\lib\jelix\core\selector\jSelectorActFast.class.php 48

i met the error when i try to access to my app after doing that commands :

php jelix --test createapp
php jelix --test createform test test

PS : i made that test with a nightly build package PSS : now i cant test anything else to add patch or any others things.

comment:2 Changed 11 years ago by foxmask

I found the issue.

in the installer.ini.php ; the name of the section "[module]" is not correct

indeed in the _loadModuleInfo of the jConfigCompiler.class.php

$section = $config->urlengine['urlScriptId'];

$section contain "index" ; but in the installer.ini.php ; there is no section index ; just a section [module] ; when i change module by index ; then the exception 12 is not meet at all.

but now i face another issue :

Fatal error: Interface 'jIInstallReporter' not found in 
E:\wamp\www3\lib\jelix\core-modules\jelix\zones\ on line 17

comment:3 Changed 11 years ago by foxmask

i dont know if its the right place but

require_once (JELIX_LIB_PATH.'installer/jIInstallReporter.iface.php');

do the trick in

now i can try to integrate patch;)

comment:4 Changed 11 years ago by laurentj

  • Version changed from 1.1.3 to trunk

comment:5 Changed 11 years ago by foxmask

La question que je me pose :

la section doit-elle contenir "index" (l'entry point il semblerait) ou "modules" ?

si cela doit etre "index" (si c'est bien de l'entrypoint qu'il s'agit) ; on doit faire évoluer "jelix-script" pour spécifier l'entrypoint et l'ajouter dans install.ini.php à la volée non ?

comment:6 Changed 11 years ago by catsoup

  • review set to review?

I added a patch which replace, in the createmodule command, for the file installer.ini, 'modules' by 'index', but it may be not enough.

Also, when -withcommandline is invoked, a new section is writed in installer.ini named after the app name, which is the script name (if it isn't, calling the script should raise an module not found error')

I added on the createmodule, the writing in the section [jelix] because if it doesn't exists, error of 'module not found' are raised when using commands with a module as parameter like createdao.

I also added the include of jIInstallReporter in

comment:7 Changed 11 years ago by laurentj

  • review changed from review? to review+

ok for this patch, even if it doesn't fixed this ticket :-)

if someone could provide a patch on createapp, which creates an installer.php script like we have in testapp/install...

comment:8 Changed 11 years ago by catsoup

My previous patch is junk.

I made a new patch, which is not fully functionnal.

  • added install/installer.php.tpl to templates but only for dev manifest
  • there is something I don't know how to fix: createapp calls createmodule, but createmodule want the installer.ini.php file to exists, and I don't know how to say it's createapp, so createmodule shouldn't do the thing with installer.ini.php

So, to be clear, when the developper create his app, then he opens his browser and his app and he should be showed the message

"installer.ini.php doesn't exist! You should install your application.. "

Then, he should call install/installer.php to create installer.ini.php

That's why I removed the creation of installer.ini.php in createapp, but, now there is the problem with createmodule

Changed 11 years ago by catsoup

Changed 11 years ago by catsoup

goes in jelix-scripts/install/templates/

comment:9 Changed 11 years ago by catsoup

  • review changed from review+ to review?

changed to review?

Changed 11 years ago by catsoup

this is the good one, removed @subpackage

comment:10 Changed 11 years ago by foxmask

je viens de mettre à jour mon clone avec la head, mais je n'ai pas ce patch (remplacement de [modules] par [index])

j'ai fait un

 php jelix.php --foxmask createapp

puis dans defaultconfig.ini.php j'ai mis 3 à la place de 2 (sinon jelix me dit ne pas trouve mon module) :


et j'obtiens :

 Fatal error: Call to undefined method checkZoneInstallReporter::showError() 
in /home/foxmask/www/www_foxmask/lib/jelix/installer/jInstallChecker.class.php on line 58

en effet sur la ligne 58 la methode showError n'est defini nulle part dans le framework ...


comment:11 Changed 11 years ago by foxmask

pour le dernier commentaire mon ticket #1022 traite du sujet

comment:12 Changed 11 years ago by laurentj

  • Resolution set to fixed
  • review review? deleted
  • Status changed from new to closed

Le premier patch est devenu inutile, j'ai plus ou moins effectué ces corrections avec les dernières avancées sur l'installeur. j'ai du egalement adapté le deuxième patch.

Note: See TracTickets for help on using tickets.