The Joomla! Forum ™






Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Wed May 30, 2007 2:33 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Sep 14, 2006 11:41 am
Posts: 225
Location: Berlin
Hi,
I was surprised, because my component everytime gets a value by JRequest::getVar( 'id' );!
The value was not included in POST or GET-Variables. The component itself could not handle
requests without an explicit id=0. Searching who was setting the value of 'id' I discover the
JRouter->parse() function. This function everytime sets all variables getting from the
default menu item (lines 180ff.). Is there a solution for my problem?

hsm

p.s. my form uses
because JRoute::_() gets not a correct value without itemids.


Last edited by Jinx on Mon Jul 16, 2007 4:45 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu May 31, 2007 8:43 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6566
This is correct behavior for JRoute. Could you better explain what your problem is ?

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
 Profile  
 
PostPosted: Fri Jun 01, 2007 9:06 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15729
Q&T Note; marking as UNDER REVIEW

_________________
Regards Robin

http://www.linkedin.com/in/robinmuilwijk - http://twitter.com/i_robin


Top
 Profile  
 
PostPosted: Mon Jun 04, 2007 12:42 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Sep 14, 2006 11:41 am
Posts: 225
Location: Berlin
Hi,
my problem is the following:
If I use a HTML-form with: and to select my component. In this case I do not expect, that any post/get-variables are set to the parameters of the default menu item.
This form has a complete destination. If view or layout or id or any other post/get-variable is set to the values of the default menu item, I do not get the default view of my component.

hsm

my workarount for this problem is, using: action="index.php&option=mycomponent"


Top
 Profile  
 
PostPosted: Tue Jun 05, 2007 9:42 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6566
Hi,

So in this case you are not linking directly to the form ? The form is part of the flow of your view, is that correct ? Aslo could you add some more information about the exact circomstances this problem is happening in ?

Thanks,

Johan

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
 Profile  
 
PostPosted: Wed Jun 06, 2007 7:51 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Sep 14, 2006 11:41 am
Posts: 225
Location: Berlin
Hi Johan,
I use forms with the MVC-structure. If I use forms with a menu-item (to call the form), it works fine. But I think routing should work without a menuitem. If I use a default-menu-item with any GET-Variables, everytime I get this variables, because the framework router.php read this variables and does not look for the option-Post-Variable before assign the default menu-item.

hsm


Top
 Profile  
 
PostPosted: Wed Jun 06, 2007 10:06 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6566
I can see your problem, I'll have a look to improve this.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
 Profile  
 
PostPosted: Wed Jun 20, 2007 8:55 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Sep 14, 2006 11:41 am
Posts: 225
Location: Berlin
Hi Johan,
please have a look at router.php at line: 225
Code:
JRequest::set($item->query, 'get', true );

if a component-route is parsed (line 392 ff), this line should not be executed, because the parameters of default menu-item are not useable for this uri.

hsm


Top
 Profile  
 
PostPosted: Sun Jul 15, 2007 1:13 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Sep 14, 2006 11:41 am
Posts: 225
Location: Berlin
Hi,
this problem is solved in #7950 and #7958. Now only a direct link to a menu-item gets variables from this item.
hsm


Top
 Profile  
 
PostPosted: Mon Jul 16, 2007 4:44 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6566
Excellent, closing this one down.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group