Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Using SH404SEF or Artio JoomSEF? Please read...

Re: Using SH404SEF or Artio JoomSEF? Please read...

I found this to be an issue, but still can't get it working. 

I have metatemplate working great, and then i tried a php rule:

if ( $_GET['Itemid'] == "24" )
   return "st dan church";

I have sh404sef set to ignore the component (gcalendar) that has Itemid 24 so the url parses because i'm using two different calendars.  as soon as I put this rule in, the meta template breaks and returns the default template.  please help.

tceko1
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

while i got it working without using metatemplate pro.  I'm still using metatemplate pro for most of my rules, but I simply 'assigned' the template using the template manager and it worked.  So for me, it just has to work and that works, but the issue on why it didn't work with metatemplate pro is still confusing to me.

tceko1
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Hi tceko1,

A couple of things about the rule you're using above:

1 - the Itemid from the url is available directly in the PHP rules as $Itemid, so you don't need to do the _GET['Itemid'] thing. Even if you need to get things from the request you should really do it the official Joomla way:  JRequest::getVar("Itemid") as this filters and strips slashes etc.

2 - it's surprising to see a template name with spaces in it. When templates are created they can have the name set in 2 places. Normally it's the same name in both places, but sometimes people set a display name that's different from the folder name (the folder that the template lives in). I wonder if the problem is that you're using the wrong name?

On the right hand side of the MetaTemplate (&Pro) rule editor there's a list of existing templates. In the list, if there's a template that has a different display name to its folder name, the folder name is mentioned in parentheses, e.g. (folder: st_dans_church). It's this folder name that you have to return in the return statement. It's most likely that this does not have spaces in it.

3 - in many cases it may be easier to simply "return true;" at the end of a rule, then use the drop-down in the SUCCEED Action to select which template should be used. Of course, if you are doing a complex set of PHP instructions that result in a variable holding the template name, then it's easier to return that name as you are doing. But it also means you need to get the name right!


Hope that helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Hello,
i just purchased Metatemplate Pro hoping to solve this issue that seem many had, that enabling a rule it return the message;

Fatal error: Cannot redeclare shcheckredirect() (previously declared in /var/www/websites/7giorni.hostinglab.it/components/com_sh404sef/sh404sef.php:21) in /var/www/websites/7giorni.hostinglab.it/components/com_sh404sef/sh404sef.php on line 41

Now, i am running Joonla 1.5 and sh404sef component just updated and Metatemplate Pro brand new, last version.

As suggested, i did set the sh404 plugin BEFORE metatemplate one, in fact sh404sef is in execution order number 1, metatemplate is 4.. but none the less, when i set the rule working (very easy one, just switch template in case of the client is IE7) i get such message.
Any hint how i could do to solve that, someone has same error even with last component updates?

thansk in advance,
L

induo2010
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Hi induo2010,

sorry to hear you are having problems with this. I haven't personally come across this problem before, and this is the first time it has been reported with MetaTemplate.

I've sent you a PM about it.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

I have Metatamplate Pro 1.14, VirtueMart 1.1.9, Sh404SEF 2.2.7.981 and Joomla 1.5.23.
When I turn Sh404SEF on then there is a problem in VirtueMart.
When you are in the cart and you click on "Update/refresh product button" or "Delete product button" then the template changes to the frontpage template. I've tried a lot of different settings and rules but I can't get it to work.
Can you please tell me what the problem is?

Thanks in advance,
Jeroen

jeroen
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Hi Jeroen,

here are a couple of things to try:

1 - in the MetaTemplate Pro Preferences (see preferences button on the Rules page), there's an option for "VM Frontpage fix". Try setting that to on or off and see if that makes any difference.

2 - it's possible that the order of plugins makes a difference. Try moving the MetaTemplate system plugin to before or after the sh404SEF system plugin, and see if that makes a difference. In general I believe the sh404SEF plugin should be BEFORE the MetaTemplate one.

If you can't get this to work I'd be happy to log in to your site and do some more testing - just send me a PM with an admin login account. Note: it may be the start of next week before I'll be able to do this.

Hope that one of those things will get it working!

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Thanks Stephen for your quick answer.
I already tried point 1 and 2 many times.
I solved it this way.

I've put the following PHP-code in my webshop template and frontpage template:

Code:

<?php echo $_SERVER['REQUEST_URI']; ?>

Then I went to the webshop and added a product to the cart.
Then I updated the cart so that I saw the frontpage template and an URL from the PHP code.
Then I made a rule in MetaTemplate Pro.
In the Advanced block I added the following code:

Code:

if ($_SERVER['REQUEST_URI'] == "/index.php?option=com_content&Itemid=73&lang=nl&view=frontpage")

return "webshop-nieuw";

And turned "Default PHP return value" to true.
"webshop-nieuw" is the name of the template.

Hopefully it will be usefull for someone else.

Greetz Jeroen

jeroen
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Thanks for the update Jeroen - that's great.

Out of interest, is that Itemid (73) the one that you would have expected for the front page? Or is Virtuemart doing its normal stupid thing and changing it to something else? That's usually the problem if/when templates or modules suddenly seem to be wrong in Virtuemart.

Hmmm... also, I see that the URL uses "com_content" instead of "com_virtuemart". That's *really* strange, that the cart update function sends the user to a content page instead of a virtuemart page! Something is very screwy there.

Anyway, looks like MetaTemplate has helped you to identify the problem and work around it, so well done.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Using SH404SEF or Artio JoomSEF? Please read...

Hello Stephen,
I get a strange behaviour with my navigation.
http://dtms.previewseiten.de/
Joomla 1.7.0
• Beez 20 Template
• Chameleon 2.15ex Pro
• sh404SEF 3.2.0.1108 (active)
I use a 2step testrule to switch my template when clicking on mobileview on the right side. While the rules are activated some submenus disappear, but the rules do their job.
E.g. 3rd level submenu: Produkte -> Service-Rufnummern -> dtmsServiceCall (missing)
or 2nd level submenu: mobileview -> Mobile Messaging (missing)
mobileview
When I deactivate the rules, everything is working fine.
SH404SEF plugin is set before chameleon.
I will send you a login via mail.
Any ideas?
Thanks and greetings from germany
Markus

Herm
Beginner Modder
ranks
useravatar
Offline
6 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1696
Total Polls:
6
Total Posts:
5941
Posts this week:
7
User Info:
 
Total Users:
5408
Newest User:
obtoc67505
Members Online:
1
Guests Online:
3547

Online: 
obtoc67505

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked