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

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#608 closed bug (invalid)

Allow to rename the "jelix-x.y.z/lib" subdir : bug in internal relative path

Reported by: maurice Owned by:
Priority: low Milestone:
Component: jelix Version: trunk
Severity: minor Keywords:
Cc: Maurice.Diamantini@… Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description (last modified by laurentj)

Two files in jelix lib distribution make use of the init.php file from the jelix lib distribution. But the relative path used for these access are not generic enough: they depend on the global directory name (wich is "lib" in the jelix distrib).

I suggest replacing the path:

require_once ('../../lib/jelix/init.php');

by :

require_once ('../jelix/init.php');

in the two files "jelix-modules/junittests/install/scripts/tests.php" and "jelix-scripts/modules/beta_migrating/install/cmdline.php".

This would allow us to rename the "jelix-1.1a1pre /lib" subdir as "lib_jelix_1.1a1pres_20080528" and easily test several jelix lib versions just by modifying the application.ini.php (in fact all the entry files for the application for now, ... but see another soon bug report)

Change History (4)

comment:1 Changed 12 years ago by laurentj

  • Description modified (diff)
  • Priority changed from high to low
  • Resolution set to invalid
  • Severity changed from major to minor
  • Status changed from new to closed

This two files are in an "install/scripts" directory. It means taht you have to copy them into the "scripts/" directory of your application. So in a standard installation, the relative path "../../lib/jelix/init.php" is good, and your's is bad. If you haven't a standard installation, you have to modify the path of this files, as you do when you create a new entrypoint in yourapp/www/

Invalid ticket so...

comment:2 Changed 12 years ago by maurice

| This two files are in an "install/scripts" directory. It means taht you
| have to copy them into the "scripts/" directory of your application.

If a script is copied in the application, it should call the ../application.init.php which is responsible to load the jelix init.php file (see the http://developer.jelix.org/ticket/609 ticket).

if realy these two scripts should be able to work either from the jelix framework tree or from an application tree, then one of the solution is to add an application.ini.php (which could be rename?) in the framework tree.

So you can reject the ticket if you like, but it's a valid, consistant and (I think) better point of vue.

comment:3 Changed 12 years ago by laurentj

if realy these two scripts should be able to work either from the jelix framework tree or from an application tree,

Your assertion is false. This scripts are a part of YOUR application, not of jelix. You should install them in YOUR application, not in jelix.

I don't see what do you want to do with this scripts other than installing them in your application.

comment:4 Changed 12 years ago by maurice

|> I don't see what do you want to do with this scripts other than installing
|> them in your application.

Thanks you very much Laurent.

I don't want to use these file, I just look after all file containing wired path with the "lib/" in there name.

It results from your remark that all these files are (or are intended to be) into the application, so this ticket is superseded by the http://developer.jelix.org/ticket/609 which would make "application.init.php" the only file which refer to the framework location.

Note: See TracTickets for help on using tickets.