Itemid refactoring in 1.5

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Itemid refactoring in 1.5

Post by infograf768 » Fri Apr 06, 2007 4:53 pm

@tcp

Beta2 can wait... I found this older picture...  :laugh:
You do not have the required permissions to view the files attached to this post.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: Itemid refactoring in 1.5

Post by tcp » Fri Apr 06, 2007 5:38 pm

@infograf

Yeah, we're in DC now actually, staying at the hotel were Reagan was shot.  We've been doing our best protecting Jinx and were quite alarmed when a Santa Cruz Joomla user infiltrated security.  The lesson learned -- use filters ( see new methods in JRequest ).

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Transliteration is a patch for "Itemid refactoring in 1.5"

Post by yvolk » Sat Apr 07, 2007 11:17 am

tcp wrote: I spoke to Jinx ( we're in DC now ) and this is also a architectural issue as well as a code issue.  At the moment we're focusing on finishing Beta 2 and transliteration will have to wait, I'm afraid.  Sorry, but please understand everyone is itching to have B2 done.
Hi, tcp!

You're right, that inserting JTransliteration class in code is an architectural decision. But this is not an "extra feature", that may be not desirable before Beta2: this is a patch to make the subject of this thread work (please start reading from my first post in this thread: http://forum.joomla.org/index.php/topic ... #msg741426).
So, if "transliteration waits", then "humanly readable links", about which Jinx wrote in the first message of this thread almost two months ago will have to wait too  :( - they simply don't work as intended for non-English content  :)  - And we're building international Joomla!
Last edited by yvolk on Sat Apr 07, 2007 11:33 am, edited 1 time in total.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7018
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Itemid refactoring in 1.5

Post by AmyStephen » Sat Apr 07, 2007 10:24 pm

Yuri -

I don't know the details of these decisions. But, I want to encourage your patience.

It is true, Joomla! v 1.5 Beta 2 is needed and it is the priority. The developers have been steadily working since September 2005 on this release. SEF URLs were not even planned for v 1.5 but I am SO glad this work has started.

It is obvious you are willing *and able* to do more than simply suggest good ideas. If you are patient, your work will be very useful to our community.

Welcome to Joomla!, Yuri. We are pleased to have you with us.

Amy :)

@tcp - In Nebraska, they want Joomla! B2, too!
You do not have the required permissions to view the files attached to this post.

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Sun Apr 08, 2007 6:19 am

Hi Yuri,

I'm in DC at the moment for the NTC and Pengiunday. I haven't had a time to look at your code yet, sorry about that. I'm hoping to be able to get too it in the coming days. Cannot make any promises as when that will be as I have a quite busy schedule next week and probably some jetlag to get rid off. But I have downloaded your work and I will give you feedback on it to see how we move forward, just a tad more patience.

Thanks,

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

http://www.joomlatools.com - Joomla extensions that just work

Head-e
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 109
Joined: Wed Mar 22, 2006 7:32 pm

Re: Itemid refactoring in 1.5

Post by Head-e » Sun Apr 08, 2007 12:10 pm

Jinx, if you make it to boston in passing i got a fridge full of cold homebrew!
What language is your laughter
What language is your sadness
What language is your joy
~ Stay Human

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Fri Apr 13, 2007 3:02 am

Another time, but I'll keep that in mind, that is if the invitation still stands ?  :pop
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Thu Apr 19, 2007 12:58 am

Hi all,

I hope that this will be my last update about the changes with itemid before we release the beta 2. Based on feedback received we have made the following two major changes to the itemid refactoring in 1.5.

1. Added alias fields to all content tables

We have added alias capabilities to all the content tables for 1.5. This to prevent link collisions when you want to create for example a menu item with the same name twice. Before the alias was generated on the fly and this gave problems. So this one should be fixed. It also adds an interesting new possibilitiy ... if you can spot it ;)

2. Changes to the component specific MyComponentParseRoute function.

The MyComponentParseRoute function now need to return an array with the parsed variables from the route. You need to make sure you pass this information back to the JRouter so he can store it. This allows you do to something like :

Code: Select all

$route = JRoute::_('&limitstart=1');
What happens here is that JRoute will use the parsed info (from the page URL) to create a full route and he will attach the &limitstart to it. This change allows you to append information to the route without the need to know the full raw route. We are using this in the pagebreak plugin and pagination API but you can easily use it in any module or plugin to create route based on the current active route.

These changes should conclude the work on Itemid for the moment. We have decided not to implement the proposed transliteration functions for beta 2. We are however looking at the proposed code and will offer feedback on that to see what we will do. Either leave it for 1.6 or do it after beta 2.

That's it so far, as always if you have any question let me know.

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

http://www.joomlatools.com - Joomla extensions that just work

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Itemid refactoring in 1.5

Post by ianmac » Thu Apr 19, 2007 4:23 am

Jinx wrote: 1. Added alias fields to all content tables

We have added alias capabilities to all the content tables for 1.5. This to prevent link collisions when you want to create for example a menu item with the same name twice. Before the alias was generated on the fly and this gave problems. So this one should be fixed. It also adds an interesting new possibilitiy ... if you can spot it ;)
What that be the ability to do manual transliteration?

Ian

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Thu Apr 19, 2007 1:18 pm

The alias fields are exposed as input fields in the UI which allows manual transliteration.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Itemid refactoring in 1.5

Post by infograf768 » Thu Apr 19, 2007 2:43 pm

This works indeed fine.  :)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
eyezberg
Joomla! Hero
Joomla! Hero
Posts: 2859
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly
Contact:

Re: Itemid refactoring in 1.5

Post by eyezberg » Thu Apr 19, 2007 7:23 pm

AmyStephen wrote: ... I want to encourage your patience.

It is true, Joomla! v 1.5 Beta 2 is needed and it is the priority. The developers have been steadily working since September 2005 on this release.
That's really a BIG understatement. All of it, priority as well as Sept. 2005.. :)
∓quot;AmyStephen"\ wrote:SEF URLs were not even planned for v 1.5 but I am SO glad this work has started...
Same as many othre things that weren't planned and which have and are delaying release more and more... and which we'll be glad to have once it's finally out!
∓quot;Jinx"\ wrote:...This change allows you to append information to the route without the need to know the full raw route. We are using this in the pagebreak plugin and pagination API but you can easily use it in any module or plugin to create route based on the current active route...
Johan, is there any info anywhere about what this "route" thing is..? tia
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.[URL banned].com for J! 1.5 screenshots
http://www.eyezberg.com

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Fri Apr 20, 2007 2:23 am

eyezberg wrote: Johan, is there any info anywhere about what this "route" thing is..? tia
Yeah, it's all in this thread :)
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
eyezberg
Joomla! Hero
Joomla! Hero
Posts: 2859
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly
Contact:

Re: Itemid refactoring in 1.5

Post by eyezberg » Fri Apr 20, 2007 7:38 pm

oh no, 4 pages.. well, I guess I'll spend some time reading then.. ;)
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.[URL banned].com for J! 1.5 screenshots
http://www.eyezberg.com

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: Itemid refactoring in 1.5

Post by tcp » Fri Apr 20, 2007 8:36 pm

jinx:

I'm noticing with the recent changes that a URL lacking an Itemid will default to the frontpage ( perhaps default menu item ).  The URL that I'm testing is as follows.

Code: Select all

http://joomla/index.php?option=com_lqm&query=12&task=showPane
A few weeks ago, this URL would have given me my component and I think this is the desired behavior.  Now, I'll instead get the frontpage w/ a PHP notice.
Notice: Trying to get property of non-object in /private/var/www/domains/joomla/html/libraries/joomla/application/menu.php on line 249
Here's the code.

Code: Select all

	function authorize($id, $accessid = 0)
	{
		$menu =& $this->getItem($id);
		return ($menu->access <= $accessid);
	}
No menu item, so no surprise that there is a warning. 

The modules go nuts.  Screenshot attached.

This notice also appears when accessing the home page, eg, http://joomla/ .

If I specify an Itemid=1, then I get the desired component page.  So, is submitting an Itemid required now?  If the option argument is specified, I don't expect to see com_content. 

On Rev 7170, w/ SEF = no, mod_rewrite = no, w/out route.php

tcp

Cross-Reference: http://forum.joomla.org/index.php/topic,161731.0.html


--edit added screenshot
You do not have the required permissions to view the files attached to this post.
Last edited by tcp on Fri Apr 20, 2007 9:24 pm, edited 1 time in total.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Fri Apr 20, 2007 10:11 pm

I notied this too, small bug in the changed implementation. Sorry about that. I'm working on it at the moment, almost done. I'll let you know so you can recheck the issue.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Sat Apr 21, 2007 1:20 pm

Problems should be fixed now. Can you recheck ?
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
hsm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Thu Sep 14, 2006 11:41 am
Location: Berlin

Re: Itemid refactoring in 1.5

Post by hsm » Sat Apr 21, 2007 1:31 pm

I have this problems since Rev. 7163:
  • I get a php-message (Notice: Trying to get property of non-object in ...libraries/joomla/application/menu.php on line 249) if I call an URI without Itemid
hsm  ???
Last edited by hsm on Sat Apr 21, 2007 1:39 pm, edited 1 time in total.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Itemid refactoring in 1.5

Post by infograf768 » Sat Apr 21, 2007 5:32 pm

in 7173 the php notice is gone.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
hsm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 225
Joined: Thu Sep 14, 2006 11:41 am
Location: Berlin

Re: Itemid refactoring in 1.5

Post by hsm » Sat Apr 21, 2007 7:40 pm

infograf768 wrote: in 7173 the php notice is gone.
Unfortunately not on my system?
hsm

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Sat Apr 21, 2007 8:37 pm

Guys could we move the bug reporting to the Q&T forum and keep this thread clean for discussions on the implementation ? Thanks.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: Itemid refactoring in 1.5

Post by yvolk » Sun Apr 22, 2007 4:17 am

Jinx wrote: ...We have decided not to implement the proposed transliteration functions for beta 2. We are however looking at the proposed code and will offer feedback on that to see what we will do. Either leave it for 1.6 or do it after beta 2.
What's about transliteration, I have some minor additions in mind, but I've decided to postpone them before I get any feedback from you.
So, pals, when work on this part of code will be active, I'm ready to do my best, just call me :)
--
Yuri
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Sun Apr 22, 2007 10:56 am

Thanks Yuri, once things settle down and beta 2 is out we can dive in again.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

velis
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Sun May 27, 2007 12:06 pm

Re: Itemid refactoring in 1.5

Post by velis » Mon Jun 04, 2007 4:37 pm

Hi guys. I apologize in advance if this turns out to be a completely n00b post :D

I don't wanna spoil any party you have going with this great new system (no pun intended), but I think you should be aware of one particular tidbit: :P

For background, I was directed here from this thread.

It seems Joomla system currently does not check for alias duplicates at any level. AFAIR, duplicates can cause some confusion in the system resulting in some menu items (articles) not being displayed correctly or not at all. I'm not sure, but perhaps it is also possible for this to mess up the actual menu display (my 2nd level menu items problem).

Is there a utility planned for duplicate checking? Or maybe even a check before the duplicate is inserted into the database in the first place?

I hope I'm being helpful and not just a pain in the arse :-*

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: Itemid refactoring in 1.5

Post by newart » Tue Jun 05, 2007 7:53 am

velis wrote: It seems Joomla system currently does not check for alias duplicates at any level. AFAIR, duplicates can cause some confusion in the system resulting in some menu items (articles) not being displayed correctly or not at all. I'm not sure, but perhaps it is also possible for this to mess up the actual menu display (my 2nd level menu items problem).
The new type of URL is great and I don't understand completely why you need an alias duplicate check... if the problem is in the menu...  :-\  :-\
former Q&T WorkGroup Joomla member - Italian Translation Team Member

User avatar
Jinx
Joomla! Champion
Joomla! Champion
Posts: 6508
Joined: Fri Aug 12, 2005 12:47 am
Contact:

Re: Itemid refactoring in 1.5

Post by Jinx » Tue Jun 05, 2007 1:53 pm

He is correcy the menu system doesn't have a duplicate alias check. This is a bug indeed and one that is one my list to fix.
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.joomlatools.com - Joomla extensions that just work

User avatar
Vince
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 143
Joined: Sun Aug 21, 2005 11:41 pm
Location: UK
Contact:

Re: Itemid refactoring in 1.5

Post by Vince » Sat Jun 23, 2007 11:23 am

Jinx wrote: He is correcy the menu system doesn't have a duplicate alias check. This is a bug indeed and one that is one my list to fix.
Hi Johan,
Not sure if you have resolved this yet or how, but I was thinking an idea may be to use Ajax to check for duplicates on the alias field itself - as you type kind of thing like some search applications do it?

Apologies if I'm totally mis-understnading the issue, but I'm not a programmer.  :-[

I also want to take this opportunity to thank you for taking on this project.

- Vince
www.hostbaron.com - low price Joomla starter packages.

www.SpanishVilla.com - Buy, rent or sell a Spanish property.

velis
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Sun May 27, 2007 12:06 pm

Re: Itemid refactoring in 1.5

Post by velis » Sat Jun 23, 2007 6:05 pm

If I understand this correctly, aliases are internal names of content in the joomla database. They are irrelevant for the end user. If this is correct then:
In this particular case (from a programmer POV) a simple check before insertion in the database would be quite enough. If the duplicate check fails, a fall back can easily be implemented to generate a unique alias without even reporting anything back to the user.
The only problem I see with this is that the aliases are used on many types of content and therefore there are many insertion / update points to correct. I did not analyze the code enough to verify this problem, so I may be off miles here ;)

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Itemid refactoring in 1.5

Post by ianmac » Sat Jun 23, 2007 10:42 pm

In 1.5, the alias becomes more visible as it is used in the generation of SEF urls.  That is why a lot of alias fields were added to the database.  But I don't think you would want to do AJAX to check this.  I think a check in the script somewhere would be sufficient, and report an error and go back if we need to force the selection of a different one.

Ian

User avatar
nobitavn94
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Jan 19, 2007 1:47 pm

Re: Itemid refactoring in 1.5

Post by nobitavn94 » Wed Jun 27, 2007 9:26 am

Hi all ,
I'm using Joomla! 1.5 beta 2.
I tested 2 ways below :
1.
  $link =JRoute::_('index.php?option=com_reports');
  $this->setRedirect($link,'Saved article successuflly');
2.
  $link ='index.php?option=com_reports' ;
  $this->setRedirect($link,'Saved article successuflly');
but it doesn't work.
The correct url I want to server redirect to include Itemid =x
In the first way ,error 500 occurs because url lack Itemid param.
In the second way ,url is as follow :
  index.php?option=com_reports&Itemid=5
and error 500 occurs.
If I use  $link =JRoute::_('index.php?option=com_reports' ,false) ; Joomla redirect to old web page after doing a task .This isn't web page I want to redirect.
Please ,help me !!!
Last edited by nobitavn94 on Wed Jun 27, 2007 9:34 am, edited 1 time in total.


Locked

Return to “Joomla! 1.5 Coding”