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

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,500
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #15 on: 13 March 2007, 02:11 »
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.


Originally sef_ext.php files were made for SEF Advance only because I invented the extension file standard. It was later adopted by other SEF components.
So if there are no defines it should work with SEF Advance. If it doesn't mail the component author.

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.


First time it would be the same number of queries until the URLs are cached. If you reload the page you will notice how the number of executed queries decrease.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #16 on: 13 March 2007, 02:21 »
Quote
First time it would be the same number of queries until the URLs are cached. If you reload the page you will notice how the number of executed queries decrease.


That's what I did. I am actually looking at the queries performed in the sef_ext.php file, and even after reloading the queries are there and the total number of queries remains the same.

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

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,500
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #17 on: 13 March 2007, 06:44 »
URLs for components are not cached, only the content URLs. And that's for a reason. Imagine a forum component with indefinite variations of URLs for each user, each post etc. You would soon end up with thousands of cache files which would be slow loaded which would defeat the original purpose: to increase the performance.

However, everywhere a content URL is displayed or executed the cached copy of URL will be used instead of calculated one. First activate the debug in main Joomla configurations which will display total executed queries by loaded page.
If you turn off SEF Advance cache and load a page (with content links or menu) and then turn on the cache and reload the same page twice you will notice the difference in number of executed queries.
« Last Edit: 13 March 2007, 06:51 by Saka »

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #18 on: 13 March 2007, 13:52 »
Ok, thanks for answering. I guess that's the trade off between having nice urls and performance.

I have managed to greatly reduce the number of queries by using a mainframe variable to store ($m->set) the result of certain queries for a page so they are also not performed twice. In a directory and list page, this avoids having to query the section name for every category on the page when the urls look like /section_name/category_name. This is how the getItemid of the core Joomla does it as well. Do you see any problems with that approach?

I know this is beyond the scope of SEF Advance support, but I will be promoting the use of your extension after I release the new version because I like how simple it is and it gets the job done. So it would be great to optimize the sef_ext.php file to work with it.
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #19 on: 16 April 2007, 21:16 »
Saka:

Have you changed anything in SEF Advance that would prevent the original issue discussed in this post from being overcome? I had managed to get everything working perfectly by spending a lot of time with the sef_ext.php file for SEF Advance and now when I installed the new trial version of SEF Advance on the almost final demo site it no longer works.

It seems like SEF Advance is now changing the Itemid in the $string variable used in the create class, even before it gets to the sef_ext file, so it's not even reading it from the url, but from the menu database. Is this right? I say this because I have a menu with option=com_jreviews&task=listsection that uses the same Itemid as another menu for a Joomla blogsection, but if I do a die($string) at the beginning of the create function I get:

index.php?option=com_jreviews&Itemid=2.....

Itemid=2 is for one of the other jReviews menus and the fact that the Itemid is at the beginning of the url instead of the end tells me SEF Advance got to it before I received it in the sef_ext.php file.

Would it be possible to get the version prior to the last one for the site in question to check whether the problem is in a change in SEF Advance?

Now I am really going crazy! I thought I no longer had to worry about this.

I really need your help to get this working, I have many users waiting for this solution and I had it working, until I tested it with the new version of SA.

Please help!

Thanks

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

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,500
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #20 on: 16 April 2007, 21:58 »
I haven't changed it, it has always taken the Itemid from the menu table, not from the string. And that's because Itemid is usually not passed in the URL but needs to be determined from the menu table.

If you need to override this Itemid it should work to use the trick I described before. I haven't changed anything there.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #21 on: 17 April 2007, 00:22 »
I really need to get the url Itemid, I tried $_SERVER['QUERY_STRING']  but that gives me the string processed by SEF Advance with the wrong Itemid.

In one of my previous posts I wrote this:

Quote
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


In my previous tests I was able to override the Itemid on the revert function and it worked fine, but for some reason now in the CREATE FUNCTION the "y" and "z" Itemid's are set to "x" and I need to get "y" and "z". Is there anyway to do that in the create function?

I appreciate the help. I believe SEF Advance will be a great companion to jReviews if we can solve this. I am also going to put a link on the demo site for SEF Advance saying that it is running on the site :)
« Last Edit: 17 April 2007, 00:29 by alejo »
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #22 on: 17 April 2007, 01:31 »
Saka, I have to rethink this. You obviously haven't changed anything, so it's something I changed. I hope I can sort this out soon. Thanks for your support.
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #23 on: 17 April 2007, 04:16 »
Ok, I think I sorted it out. I apologize for the panic attack! :-[
jReviews :: Directory / Ratings / Reviews
http://www.reviewsforjoomla.com

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,500
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #24 on: 17 April 2007, 14:36 »
That's great. No problem.

alejo

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Disappearing modules + other minor issue jReviews
« Reply #25 on: 17 April 2007, 14:39 »
Hey, I bought the component yesterday but have not received it yet. As soon as I do I will enable it on the new demo site. Anyone interested in seeing it in action can go here:

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

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,500
    • View Profile
    • Sakic.Net
Re: Disappearing modules + other minor issue jReviews
« Reply #26 on: 17 April 2007, 14:58 »
I had problems with server, just fixed it and sent you thie file.

Demo site is looking great.  ;)