Post by deeve » Thu Apr 04, 2013 10:40 pm

I've tried to get some support from the Author of an extension I bought on here but he seems to have gone awal. I've been trying to get his vQmod extension to work but it throws errors on the base url page. The mod allows you to place scripts on specific pages but uses the route variable to declare. This all works fine on all pages except base url as says the Index route is undefined.

I was wondering therefore if it were possible to add an If clause to identify if the page is base url & to conditionally set the route to common/home just for that page?

Any advise much appreciated.

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm

Post by butte » Fri Apr 05, 2013 11:34 am

Where you've said "Index route" you may find that it's supposed to be "index route" in code that seemed not to work. You can also try what you've suggested, just follow v. carefully the machine-readable syntax and punctuation in whichever code examples you might mimic for this particular purpose. Of course, make backup copies first.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by deeve » Fri Apr 05, 2013 5:33 pm

@butte,
many thanks for your reply. I have tried so many different ways of doing this with zero results! I know it is the extension causing the errors because if I disable the xml file the site goes back to working fine, just without the scripts I need to appear in the header!

I understand the extension needs to declare the route for each page in order to distinguish which page it's on but am stumped on how to do this for the base url as obviously it does not have a route.

Here's the last attempt I placed within header.tpl

Code: Select all

<?php if (isset($this->url->link == $base)){
$route = 'common/home';
} ?>

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm

Post by butte » Sat Apr 06, 2013 4:02 am

Okay, then with special reference to the .xml file instead (or along with other files) . . .

Remember to doublecheck whether than letter is "I" or "i" before "ndex" (the code is looking for one, not the other, and Linux sees the two as entirely different). Everything courses through index.php, which itself is basal and has routes appended (as you see in the address bar; and status bar upon hovering over the footer). That is why I assume that misspelling "index" as "Index" somewhere in code somewhere among files somewhere in the extension. It would hardly be a surprising typrograpigal errot. You can use a pure text editor to search for "Index" and then if that is found, to replace "all" instances in "all" files at once with "index" instead. Back up every affected (edited) file beforehand.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by deeve » Sat Apr 06, 2013 4:26 am

I just did a search & couldn't find any instances of index spelled as Index in this extension. The error I receive only when on my site's base url page [homepage without route] is:
Notice: Undefined index: route in /var/www/vhosts/mysite.co.uk/httpdocs/catalog/model/design/aduakasoft_custom_javascript.php on line 17
and line 17 of the file in question is:
if (($value['type'] == $type) AND ($value['route'] == $this->request->get['route']))

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm

Post by butte » Sat Apr 06, 2013 5:41 am

What is the URL? If you wish you may send it PM.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by butte » Sat Apr 06, 2013 8:21 am

Okay, initially (a) the "development store" throws a list of errors and "seems" (since the error list shoves it downward) to have no header till hitting log-in or register brings up a semblance of home, and (b) the linked-to "current store" works okay in usual ways.

Please turn off error reporting (not logging) in host control panel and in OC admin panel, reinstate .xml (if it's sidelined now), and we'll see whether mysql.php itself is throwing the errors. (See PM.)

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: Bing [Bot] and 93 guests