Quick links: Content - sections - sub sections
EN FR
Quick Search Advanced search
 
Page

  [Opened] jCommunity login

Posted by Kirk on 10/12/2010 09:38

I've begun using jCommunity to save me the trouble of coding all the registration and validation stuff, but after installation the site is still giving me the jAuth login form when accessing actions such as default:index. Can I set it to give the jCommunity login form instead?

  [Opened] Re: jCommunity login

Reply #1 Posted by Kirk on 10/12/2010 10:02

To clarify: auth_required = on because you should (in general) not be able to access the site without logging in.

  [Opened] jCommunity login

Reply #2 Posted by catsoup on 10/12/2010 16:25

Hello, This might happen because you have another auth plugin activated, jcommunity is independent of jauth module as said here: http://bitbucket.org/laurentj/jcommunity(..)

To test from scratch (with jelix 1.2):

  • create an app php jelix.php --myapp createapp
  • configure your dbprofil in dbprofils.ini.php
  • configure your basepath in defaultconfig.ini.php
  • copy jcommunity in your modules directory
  • install the jcommunity module php jelix.php --myapp installmodule jcommunity
  • change the start action in index/config.ini.php like this:
startModule=jcommunity
startAction="login:index"

Then see the difference with your project and this app in the var/config directory
I suspect that you have another auth plugin activated in your defaultconfig.ini.php, as you'll see, the auto install of the module only activate the plugin in index/config.ini.php

Hope this helps :)

  [Opened] jCommunity login

Reply #3 Posted by catsoup on 10/12/2010 16:47

I was playing jcommunity, and noticed that there might be a disturbing thing after installing, If the start action is the one by default after a createapp:

startModule=myapp
startAction="default:index"

We are stuck in an infinite loop, it's because of this default param in auth.coord.ini.php: on_error_action = "jcommunity~login:out" (sorry :+o make a smiley)
Wich should be on_error_action = "jcommunity~login:index"

It's probably worth to make a ticket ?

  [Opened] jCommunity login

Reply #4 Posted by Kirk on 10/12/2010 16:58

Thank you for your reply.

I should note that I am working with Jelix 1.1 and jCommunity 0.2, and that I am not using any other auth plugins (or at least I think so). Nevertheless, I have followed your steps and did the installation by hand as described in the documentation.

In this test from scratch, the

startModule=jcommunity
startAction="login:index"

bits make the jCommunity login form display when accessing the application index, as expected. however, when I access index.php/myapp/default/index or any other controller action, I get a jAuth login form and not a jCommunity login form, just like with my application.

  [Opened] jCommunity login

Reply #5 Posted by Kirk on 10/12/2010 17:05

I made that post before seeing your other post, I'm testing it now :D

  [Opened] jCommunity login

Reply #6 Posted by Kirk on 10/12/2010 17:10

It works! The jCommunity login form is now displayed as expected when accessing my controller actions :)

Thank you for your help!

  [Opened] jCommunity login

Reply #7 Posted by catsoup on 10/12/2010 18:56

Cool!
But in fact, I think it's a bug of jcommunity, and you should restore on_error_action = "jcommunity~login:out" when it will be fixed.

For info, wich browser are you using ? because, I didn't have the same behaviour (for me it is an infinite redirection loop)

For laurentj: I have bumped ticket 5 of jcommunity with a patch

  [Opened] jCommunity login

Reply #8 Posted by Kirk on 10/15/2010 13:16

Firefox 3.6.9 for Windows.

  [Opened] jCommunity login

Reply #9 Posted by Kirk on 10/15/2010 14:37

Talking about bugs in jCommunity, on line 70 of account.classic.php it says:

        try {
<code>
            $form->initFromDao('user');
        }catch(Exception $e){
            return $rep;
        }
</code>

where I think it should be

<code>
        try {
            $form->initFromDao($this->getDaoName());
        }catch(Exception $e){
            return $rep;
        }
</code>
 
Page
  1. jCommunity login