Going Crazy!!!! :S

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
sylvesterfaro
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Sep 09, 2007 9:01 am

Going Crazy!!!! :S

Post by sylvesterfaro » Sun Sep 09, 2007 9:21 am

Ok. I am a newbie... but I did read the documentation. (sorry about the poor english - I'm portuguese)

Here it goes...

I'm programming a simple component that allows to an administrator do make simple updates on a database. It's a simple form with a list of records with a check box to turn on or off and press a Submit button.

The thing is that everytime I submit the form (either by pressing the submit button or changing the number of visible records) I'm redirected to the Control Panel :(

The Component name is redesocialcascais

At toolbar.redesocialcascais.html I have:

class redesocialcascaisToolbar {
    /**
     * Displays toolbar
     */
    function projectos(){
        mosMenuBar::startTable();
        mosMenuBar::apply('projectoaplicar');
        mosMenuBar::spacer();
        mosMenuBar::back();
        mosMenuBar::spacer();
        mosMenuBar::help( 'ajuda.html', true );
        mosMenuBar::endTable();
    }

}



And at admin.redesocialcascais.php I have:

switch ($task) {
     case 'projectos':
          HTML_projectos::listar();
          break;

     case 'projectoaplicar':
          aplicar();
          break;

    default:
           break;
}



Maybe this can give a hint on wath is going on...

At my component form I have the following path showned:
Rede Social de Cascais / com_redesocialcascais / projectos

After I press the Submit button, I go back to the Control Panel and the path shown is:
Rede Social de Cascais / com_admin / projectoaplicar

It seems Joomla is forwarding the task projectoaplicar to the admin component instead of my own component?

What am I doing wrong?  :'(
This is on Joomla 10.0.13
Last edited by sylvesterfaro on Sun Sep 09, 2007 9:25 am, edited 1 time in total.

User avatar
jlleblanc
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Fri Aug 19, 2005 12:37 am
Location: Washington, DC / NoVA
Contact:

Re: Going Crazy!!!! :S

Post by jlleblanc » Mon Sep 10, 2007 12:38 pm

If you have 'option' has a hidden variable in your form and set it to 'com_redesocialcascais', it should work. Like this:

Code: Select all

<input type="hidden" name="option" value="com_redesocialcascais" />
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php

User avatar
matthewhayashida
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Sat Feb 10, 2007 8:26 pm
Location: Abbotsford, BC
Contact:

Re: Going Crazy!!!! :S

Post by matthewhayashida » Tue Sep 11, 2007 12:45 am

MOD NOTE: Moving to Joombie Q/A
-Matt Hayashida

sylvesterfaro
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Sep 09, 2007 9:01 am

Re: Going Crazy!!!! :S

Post by sylvesterfaro » Tue Sep 11, 2007 7:40 am

jlleblanc wrote:If you have 'option' has a hidden variable in your form and set it to 'com_redesocialcascais', it should work. Like this:

Code: Select all

<input type="hidden" name="option" value="com_redesocialcascais" />



AAaaaAAAaaaaAAAaAAaaaaHH!!  :D

Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks! Thanks!

By the way... where can I get more complete documentation on Joomla 10.0.13??? It seems to be hard to find.  :(

User avatar
jlleblanc
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Fri Aug 19, 2005 12:37 am
Location: Washington, DC / NoVA
Contact:

Re: Going Crazy!!!! :S

Post by jlleblanc » Tue Sep 11, 2007 12:50 pm

Most of the documentation effort is now going into 1.5. The 1.0.x documentation was never really complete.
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php


Post Reply