Author Topic: Disappearing modules + other minor issue jReviews  (Read 21879 times)

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Disappearing modules + other minor issue jReviews
« on: 15 February 2007, 16:57 »
Hi Saka:

I downloaded the trial and have been testing it with the jReviews sef_ext.php file I had created for OpenSEF. Amazingly it works perfect, without changes. There are a couple of issues though:

1) Itemid on pagination: In jReviews, when I send a link to the pageNav class I use $_SERVER['QUERY_STRING'] to send all the url parameters. For some strange reason, when SEFAdvance is on, it adds a second Itemid with the wront number right after the option parameter which ends up messing up the pagination. I had to put a bit of code to strip the first Itemid found on the url so it works ok.

2) Disappearing modules: I read on this forum that someone else had a similar problem with iJoomla. The problem is that modules assigned to specific menus don't show up. Only modules assigned to all pages work. I understand that this is related to Itemid and that after reverting the friendly url to it's non friendly state the Itemid is lost and the module does not show up.

Is figuring out the Itemid part of the work that needs to be done in the sef_ext.php file in the revert function and then add it as a url parameter? I guess OpenSEF's easy way of doing this is to append the Itemid to the urls,  how do you typically resolve this issue?

Thanks!

Alejo
« Last Edit: 15 February 2007, 17:08 by alejo »
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,453
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #1 on: 17 February 2007, 01:19 »
Both are Itemid issues. SEF Advance finds the correct Itemid for you so just make sure you don't have duplicates or trashed menu items according to: http://www.sakic.net/support/faq/sef_advance/#16

You don't have to worry about adding or appending Itemid in the extension file because Itemid is calculated by SEF Advance instead.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #2 on: 17 February 2007, 02:19 »
I don't have duplicate name menus or trashed menus, but I guess the problem is that I do have multiple different name menus that look like this:

index.php?option=com_jreviews&Itemid=x
index.php?option=com_jreviews&Itemid=y
index.php?option=com_jreviews&Itemid=z

It seems SEFAdvance picks up the first Itemid it finds for jreviews and that's why it is adding the wrong one to the pagination and why modules disappear. Is there a solution to this? Each menu has a different functionality depending on the menu parameters chosen.

Thanks for the previous response,

Alejo
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,453
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #3 on: 17 February 2007, 02:52 »
That's not standard Joomla! behavior. You should always have only one Itemid for a single component.

You could, however, use alias as workaround.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #4 on: 17 February 2007, 03:00 »
Quote
That's not standard Joomla! behavior.


What do you mean? It's a lot easier for users to create menus this way than having to look up somewhere that they should create a url menu and put in:

index.php?option=com_jreviews&task=this&param=that&so=so

I understand the Item ids get messed up with SEFAdvance, but as long as it is possible to retrieve the Itemid it works ok, as is the case with Joomla core sef.

At what point does SEFAdvance append the Itemid? Maybe I can strip it and put in my own? I just want to use this as a work around, but I understand the problem and will try to instruct my users to use the "other" way of creating component menus.

Thanks again,

Alejo
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #5 on: 17 February 2007, 07:15 »
Hi again.

Apart from the following problem everything seems to be working great. I would be nice to solve this because my customers will be happy to be able to use SEF Advance.

So the problem, as stated in my previous posts is disappearing modules or they simply never appear.

If a person wants to have multiple menu links for different jReviews tasks
and for each menu he wants to assign a different module, the modules just don't show. The links need to be created as url menus, per your comment above about using parameters not being a Joomla! standard. This is what the menus look like:

index.php?option=com_jreviews&task=listsection&dir=1&section=1
index.php?option=com_jreviews&task=listsection&dir=1&section=2

I am really looking forward to figuring this out. The FAQ about pathway, etc. is fine and I understand what needs to be done for core Joomla content, but what about 3rd party components?

Thanks,

Alejo
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,453
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #6 on: 17 February 2007, 19:00 »
alejo: a single component is suposed to have only one menu link and only one Itemid, not multiple Itemids.
What you do (artificially attaching Itemids) is not standard Joomla behavior. While it may work when SEF is off (because you can simply add it to URL) it is not supported by SEF Advance (because you don't pass Itemids in URLs but SEF Advance calculates it instead).

I will see if there could be some workaround used in the extension file but can't do it immediately as I am not at the office. I will get back to the topic in regular working hours.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #7 on: 17 February 2007, 20:31 »
Ok, i appreciate your looking into this. Let me give you an example of how this would be useful in the case jReviews users.

jReviews allows the user to create multiple directories. So a user creates a separate menu link for each directory and then he wants to assign a different navigation module to each directory. That's just a simple example, but there are a lot of other useful things that can be done with jReviews modules and specific menus, like narrowing down search results using fields that are specific to a category and require separate modules, etc.

The only thing I need is for SEF Advance to not find an Itemid if one is already found by the sef_ext.php file. It sort of works already, but not always, because sometimes it seems like SEF Advance is overriding the one I am outputting in the sef_ext file. What I did for my urls is that if it is a menu link I put something like /m/15, which means that it's a menu and the Itemid is 15, so when I revert the friendly url to it's non friendly one I do:

$_REQUEST['Itemid'] = $_POST['Itemid'] = $_GET['Itemid'] = 15

I am guessing that SEF Advance overwrites this in some cases. I can also find the Itemid myself even if the url is not in the /m/15 format. I just need a method to override SEF Advance's discovery of the Itemid.

I have not finished my tests yet, but jReviews also uses Joomla content and the content links inherit the Itemid of the directory they are in, or like with Joomla content, if a jReviews section list or category list menu exists, then they inherit that Itemid. I created my own getItemid function to do this. So I need to check whether the correct modules show up depending on what directory the content belongs in.

Thanks for your help.

Alejo
« Last Edit: 17 February 2007, 20:33 by alejo »
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,453
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #8 on: 17 February 2007, 22:40 »
Yes I understand.
I will look into it and get back to you soon.

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,453
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #9 on: 23 February 2007, 00:25 »
Hi,

I have looked into this issue and here is how you can override setting of Itemid from within the extension:

First determine $Itemid. Then set:
$_GET['Itemid'] = $Itemid;
$_REQUEST['Itemid'] = $Itemid;

Then create this variable:
$QUERY_STRING = "option=$option&Itemid=$Itemid";
Don't forget to globalize it if it's within a function.

This should now override the Itemid setting of the SEF Advance.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #10 on: 23 February 2007, 01:25 »
Thanks! I really appreciate this and I will try it soon. Would it be possible to extend the trial license for a few days?
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,453
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #11 on: 23 February 2007, 02:54 »
Would it be possible to extend the trial license for a few days?

I reset your record so you can download the trial again.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #12 on: 23 February 2007, 02:56 »
Thanks a lot. I will try to do this soon. Your support is excellent!
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #13 on: 12 March 2007, 20:53 »
Finally I was able to get back to this. Your solution works great. I decided to use the menu name as a replacement for the Itemid I was using on the menus and since the menu names need to be unique this works perfect, although now menu names need to be unique from content sections as well, but I don't think that's a problem.

A couple of questions:

1) How can I check if SEF Advance is installed and enabled for jReviews? With OpenSEF you do a check for _OPENSEF, is there a constant defined in SEF Advance that I can check? I need this for my xajax functionality because I have to manually include the SEF file if it is enabled to redirect to a sef url because the xajax bot is run before the sef one.

2) I can't seem to get the new caching to work. The cache files are created but the number of queries remain the same (using the Joomla debug). I assume the cache is checked before running the create function, correct? What could be the problem? I am running this on a local server.

Thanks,
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #14 on: 12 March 2007, 23:05 »
1) How can I check if SEF Advance is installed and enabled for jReviews? With OpenSEF you do a check for _OPENSEF, is there a constant defined in SEF Advance that I can check? I need this for my xajax functionality because I have to manually include the SEF file if it is enabled to redirect to a sef url because the xajax bot is run before the sef one.


Never mind about this. Your SEF works fine, it's only with open sef that I need to include a sef class file to convert the urls using xajax. Weird.

I still can't get the cache to work though.
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com