Discussion:
Setup broken?
Lars
2010-01-25 21:06:27 UTC
Permalink
Hi guys,

unfortunately it took a bit longer than expected, but now I'm starting.. ;)

For a start I tried to install phpgw from trunk.
I checked the whole thing out and wanted to install everything.

Unfortunately I encountered quite a lot of errors (e.g. undefined variables, undefined offsets...) in the setup.

Is this a problem just on my machine or can others verify this?
If others can verify that it doesn't work I'll start with fixing the setup.

Reproduce:
- checkout phpgw from trunk
- create a new db and dbuser
- open http://www.your_server.whatever/phpgroupware/setup
- follow the steps. Do you see errors?

Thanks,

frozen.

Sent from the phpGroupWare forums @ forums.phpGroupWare.org
Sigurd Nes
2010-01-25 21:12:54 UTC
Permalink
Post by Lars
Hi guys,
unfortunately it took a bit longer than expected, but now I'm starting.. ;)
For a start I tried to install phpgw from trunk.
I checked the whole thing out and wanted to install everything.
Unfortunately I encountered quite a lot of errors (e.g. undefined variables, undefined offsets...) in the setup.
Is this a problem just on my machine or can others verify this?
If others can verify that it doesn't work I'll start with fixing the setup.
- checkout phpgw from trunk
- create a new db and dbuser
- open http://www.your_server.whatever/phpgroupware/setup
- follow the steps. Do you see errors?
Thanks,
frozen.
Hi Lars,

Have you tried the one from /people/sigurdne/core/trunk ?

You will have to modify your ~/.ssh/config to have this two lines :
Host *.savannah.gnu.org
User <your username>


Regards

Sigurd
Lars
2010-01-25 21:41:20 UTC
Permalink
sigurdne wrote on Mon, 25 January 2010 22&#58;12
Post by Sigurd Nes
Have you tried the one from /people/sigurdne/core/trunk ?
No, not yet, but I will tomorrow. .

Sent from the phpGroupWare forums @ forums.phpGroupWare.org
Benoit Hamet
2010-01-26 08:48:49 UTC
Permalink
Hi Lars,

Hi all,

Sorry to be so slow to answer, but I have a lot's of work atm ... Will
be working on phpgw tomorrow.
Post by Lars
Hi guys,
unfortunately it took a bit longer than expected, but now I'm starting.. ;)
For a start I tried to install phpgw from trunk.
I checked the whole thing out and wanted to install everything.
Unfortunately I encountered quite a lot of errors (e.g. undefined variables, undefined offsets...) in the setup.
Is this a problem just on my machine or can others verify this?
If others can verify that it doesn't work I'll start with fixing the setup.
- checkout phpgw from trunk
- create a new db and dbuser
- open http://www.your_server.whatever/phpgroupware/setup
- follow the steps. Do you see errors?
Nope. So I'm interested in your setup configuration apache version, php
version, *sql version, etc ... So I can try to reproduce them.

Welcome on the project. As maat says, the official devs are in trunk. We
will be merging some of Sigurd tree's fixes as soon as we can test them.

I will be more interactive tommorow on irc.freenode.net #phpgw

Regards,

Caeies.
Post by Lars
Thanks,
frozen.
_______________________________________________
phpGroupWare-developers mailing list
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
Lars
2010-01-26 09:40:03 UTC
Permalink
Benoit HAMET wrote on Tue, 26 January 2010 09&#58;48
Post by Benoit Hamet
Nope. So I'm interested in your setup configuration apache version, php
version, *sql version, etc ... So I can try to reproduce them.
It's a debian squeeze system. Currently it is running:
Apache: 2.2.14
PHP: 5.2.12-2
MySQL: 5.1.41-3

I'm not yet sure, but I suggest, there was something wrong with filesystem permissions (users directory out of webroot not writeable) and will check that. IF this was the (main) problem, I think we should add a check if this directory is writeable..

I guess the missing translations for german can be fixed at a later date.

Benoit HAMET
Post by Benoit Hamet
Welcome on the project. As maat says, the official devs are in trunk. We
will be merging some of Sigurd tree's fixes as soon as we can test them.
Thank you!

Sigurd, I tested your code now. With correct filesystem permissions.. ;)

The setup worked flawless. It's a bit confusing, but I experienced no errors.
I'd like to play around with it to make it easier.

After the setup there are some errors. Like:
!Notice: Undefined offset: 1 in /path/to/phpgroupware/phpgwapi/inc/class.browser.inc.php at line 55

#0 createObject(calendar.uicalendar)
[/path/to/phpgroupware/index.php:88]
#1 call_user_func(phpgwapi_object_factory::createObject, calendar.uicalendar, _UNDEF_...)
[/path/to/phpgroupware/phpgwapi/inc/common_functions.inc.php:243]
#2 phpgwapi_object_factory::createObject(calendar.uicalendar, _UNDEF_,...)
[unknown:?]
#3 uicalendar->uicalendar()
[/path/to/phpgroupware/phpgwapi/inc/class.object_factory.inc.php:90]
#4 createObject(phpgwapi.browser)
[/path/to/phpgroupware/calendar/inc/class.uicalendar.inc.php:104]
#5 call_user_func(phpgwapi_ofphpgwapi::createObject, phpgwapi.browser, _UNDEF_,...)
[/path/to/phpgroupware/phpgwapi/inc/common_functions.inc.php:243]
#6 phpgwapi_ofphpgwapi::createObject(phpgwapi.browser, _UNDEF_,...)
[unknown:?]
#7 phpgwapi_object_factory::createObject(phpgwapi.browser, _UNDEF_, ...)
[/path/to/phpgroupware/phpgwapi/inc/class.ofphpgwapi.inc.php:86]
#8 phpgwapi_browser->__construct()
[/path/to/phpgroupware/phpgwapi/inc/class.object_factory.inc.php:90]
when I click on the calendar.

BTW: We should try to replace "/path/to/phpgroupware" with the real thing. I first thought this was an error when trying to find the real path.. ;) It's also not very helping when you have two or more installations of phpgroupware.

Now I need to know, with which code I should start when playing with the setup. Sigurds or the official? Merging the two might be a good idea too.. I'll have a look, try some diffs and more and then see if I can merge the two before changing it's functionality.

Regards,

Lars.

Sent from the phpGroupWare forums @ forums.phpGroupWare.org
Sigurd Nes
2010-01-26 13:40:35 UTC
Permalink
Sent: 2010-01-26 10:40:03 MET
Subject: [phpGroupWare-developers] Re: Setup broken?
Sigurd, I tested your code now. With correct filesystem permissions.. ;)
The setup worked flawless. It's a bit confusing, but I experienced no errors.
I'd like to play around with it to make it easier.
!Notice: Undefined offset: 1 in /path/to/phpgroupware/phpgwapi/inc/class.browser.inc.php at line 55
Try now...(after a svn up)
BTW: We should try to replace "/path/to/phpgroupware" with the real thing. I first thought this was an error when trying to find the real path.. ;) It's also not very helping when you have two or more installations of phpgroupware.
Updated: if you are admin - you will get the "real thing"
Now I need to know, with which code I should start when playing with the setup. Sigurds or the official? Merging the two might be a good idea too.. I'll have a look, try some diffs and more and then see if I can merge the two before changing it's functionality.
Some while ago - someone dumped an untested monsterpatch into trunk which more or less broke the system.

All intended improvements from that patch has been refined, tested and fixed over the two last years in my version.

imho: The official trunk has fallen badly behind - the shortest route would be to keep the old trunk for reference and start over with my version as the new trunk.

If one really wants to keep the current trunk - I think the best option would be to revert to the state before the monsterpatch - and then try to merge in improvements one by one.

Regards

Sigurd
Lars
2010-01-26 15:23:18 UTC
Permalink
sigurdne wrote on Tue, 26 January 2010 14&#58;40
Post by Sigurd Nes
Try now...(after a svn up)
[...]
Updated: if you are admin - you will get the "real thing"
Great, both seem to work like a charm. There are more errors though.. ;)

Example:

!Notice: Undefined variable: i in /var/www/phpgw_sigurd/phpgwapi/inc/class.sbox.inc.php at line 355

#0 uitodo->add() [/var/www/phpgw_sigurd/index.php:111]

See the correct path? ;)

sigurdne wrote on Tue, 26 January 2010 14&#58;40
Post by Sigurd Nes
Some while ago - someone dumped an untested monsterpatch into trunk which more or less broke the system.
All intended improvements from that patch has been refined, tested and fixed over the two last years in my version.
imho: The official trunk has fallen badly behind - the shortest route would be to keep the old trunk for reference and start over with my version as the new trunk.
If one really wants to keep the current trunk - I think the best option would be to revert to the state before the monsterpatch - and then try to merge in improvements one by one.
I see.

So I'll ignore the merging of the two trunks for the moment and will start changing the setup routine from your code.

Could someone briefly explain, how the templates work and how translations are thought to be added? Thanks!

Regards,

frozen.

Sent from the phpGroupWare forums @ forums.phpGroupWare.org
Sigurd Nes
2010-01-26 17:19:19 UTC
Permalink
Post by Lars
Could someone briefly explain, how the templates work and how translations are thought to be added? Thanks!
There are three type of templates (if one count the YUI):

1) PHPLIB // oldest

Maybe someone else can describe this one...

Or pick a simple app (as 'todo') to see how it is used

2) XSLT // newer

Applications like admin, notes, property, hrm uses the XSLT-approach

the principle:

you load a XSLT-template into the template-engine and then follow up with an array.

the array is auto-converted to XML and the template is applied on the XML for
rendering.

see xslttemplates::parse for details

example:

// start
$GLOBALS['phpgw_info']['flags']['xslt_app'] = true; // Has to be set to render xslt
$GLOBALS['phpgw']->xslttpl->add_file(array('some_stylesheet', 'and_another'));

$data = array('data generated from your ui-object');

$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data)); //'list' is
where to start inside the template

// end

Translations can be called directly from the template as:

<xsl:value-of select="php:function('lang', 'translate me')" />

Note: the xmlns has to be defined - example from admin:
<xsl:template match="group_edit" xmlns:php="http://php.net/xsl">


I recommend having a look at notes and (some of) admin to see XSLT in action.
Note: the amount of translation code is down 50% from what you see in notes

3) YUI library // latest
Property uses YUI on top of the XSLT for tables, pagination, filters
The booking and bookingfrontend (which is soon to be published) use a smarter
combination of XSLT/YUI with a common ui-class and drop-in YUI-widgets

Regards

Sigurd
Lars
2010-01-26 19:32:05 UTC
Permalink
Thank you VERY much, sigurd. This helps! So I'll try to use xslt, if I ever have to create a new template. ;)

I have been looking through quite some code now and start to understand it.. ;) Unfortunately I will not be at home tomorrow until late in the afternoon. When I'm back I'll start playing around with the setup code, trying to let it look different and maybe easier. This will for sure help me to learn how things play together.

Regards,

Lars.

Sent from the phpGroupWare forums @ forums.phpGroupWare.org
Sigurd Nes
2010-01-26 20:22:36 UTC
Permalink
Post by Lars
Thank you VERY much, sigurd. This helps! So I'll try to use xslt, if I ever have to create a new template. ;)
I have been looking through quite some code now and start to understand it.. ;) Unfortunately I will not be at home tomorrow until late in the afternoon. When I'm back I'll start playing around with the setup code, trying to let it look different and maybe easier. This will for sure help me to learn how things play together.
That's great !

In order to understand the setup - you probably will have to know about two
spesific files:

1) setup/templates/base/config.tpl
2) setup/inc/hook_config.inc

what you see when you click on the "Edit Current Configuration" is produced by
config.tpl (which is fed into the template engine in setup/config.php around
line 225)

for fun: try to comment out $setup_tpl->pparse('out','T_config_pre_script'); on
line 218

Inside config.tpl you will find statements as {hook_encryptalgo} - this is a
call to the function encryptalgo in the file hook_config.inc


All (well - most) applications have their own version of the config.tpl - which
stores per-app-config-data to the database.


Regards

Sigurd

Loading...