Jump to content

Category Bar - URL different.


harrisorganic
 Share

Recommended Posts

Hi Brian,

This issue raised its ugly head a few weeks ago.

 I  found that the category bar gives an unusual url when I am  mousing over an item. On any page not just the front page gives the incorrect url.

eg. https://www.harrisorganicwine.com.au/shop/ Hover over the word category sparkling gives https://www.harrisorganicwine.com.au/shop/sparkling.html where there should be no "m."

I have not been able to find what turns it on and off, but it does come and go without any input from myself.

As an example it appeared this morning and then I refreshed the page and it was gone, other times refreshing does nothing.  I have tested this on another Pc too with the same error.

However on other sections of the page, ie the latest product area or best sellers there is no issue.

So there is some thing effecting the category bar .

Todays error log is attached, noting there is an issue with the plugin area which I have asked Al at Cubecart to look into.

Any thoughts where to check this out; possibly waiting until the plugin situation is cleared up, but I dont know which one may or may not be effecting these issues.

 

error_log

Edited by harrisorganic
Link to comment
Share on other sites

Looking over the error log, there is nothing to explain the different URLs of the navigation menu.

I do know that the navigation menu is cached in it's entirety, with complete URLs (as opposed to relative URLs).

So, when occasion arises to clear the cache (most always when entering the admin, and numerous, but not all, actions taken on the storefront), the navigation menu is rebuilt the first time a page request is made to the storefront.

That rebuilding uses the SERVER REQUEST HOST (or something similar to that, I'm almost sure) to construct the complete URL. So, if this is the cause, then your domain name of harrisorganicwine.com.au must have some sort of very loose, or 'wildcard' situation where nothing at all, or www, or www.m, or practically anything can be used to get to your site.

I just tested this hypothesis:

Request:
http://www.m.harrisorganicwine.com.au
Response: 301 (maybe 302?) to:
https://www.m.harrisorganicwine.com.au

Then, the SSL cert does not match.

What I would like for you to do is to get a copy of your site's access logs. (Not the web server error logs.) You should see requests for the www.m subdomain and how the web server responded. Any 200 response to the /shop/ folder and we found our smoking gun.

Link to comment
Share on other sites

Hi Brian, I found the access logs, there was two, one for the month and one for yesterday.

Neither had www.m.....

All we can do is wait and see if it happens again, then grab the access logs.

Having said that, Al has fixed the plugin update issue and said "This is the first time I've seen the token installer fail. I fixed it by removing the "null data" sent with the request. I expect a slightly different server config or cURL version is the reason. "

Whether there is some relationship, between the issues, I have no idea, but worth mentioning.

best regards Duncan

 

Link to comment
Share on other sites

There should have been access attempts to www.m from me in yesterday's log.

Unless the web server does not log unless and until the server has something to respond. Since the SSL cert blocked me, maybe that's why.

Ok, just now (6 Jan, 2016, 05:35 UTC) I bypassed my browser's objection to the SSL cert concern. That let me request a page at www.m and it was delivered. (Note: In some cases, there is a separate log file for accesses to your site via SSL.)

The navigation menu still has the good URLs - as it is coming from the cache.

I forced your site to clear the cache (CubeCart lets me do that), and the navigation menu was rebuilt. It now has the www.m URLs.

Link to comment
Share on other sites

Found it: in the std log access file.

40.77.167.14 - - [05/Jan/2016:22:39:14 -0700] "GET / HTTP/1.1" 301 617 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
70.89.163.49 - - [05/Jan/2016:22:39:25 -0700] "GET /shop/dry-whites.html HTTP/1.1" 200 14304 "https://www.m.   ......."Mozilla/5.0 (Windows NT 5.1; rv:41.0) Gecko/20100101 Firefox/41.0"
70.89.163.49 - - [05/Jan/2016:22:39:26 -0700] "GET /shop/images/cache/Wine/Chilli-White-Wine.190.jpg HTTP/1.1" 200 6708 "https://www.harrisorganicwine.com.au/shop/organic-white.html" "Mozilla/5.0 (Windows NT 5.1; rv:41.0) Gecko/20100101 Firefox/41.0"
70.89.163.49 - - [05/Jan/2016:22:39:26 -0700] "GET /shop/images/cache/Wine/verd.190.jpg HTTP/1.1" 200 12074 "https://www.harrisorganicwine.com.au/shop/organic-white.html" "Mozilla/5.0 (Windows NT 5.1; rv:41.0) Gecko/20100101 Firefox/41.0"
70.89.163.49 - - [05/Jan/2016:22:39:26 -0700] "GET /shop/images/cache/Wine/chardonnay.190.jpg HTTP/1.1" 200 11450 "https://www.harrisorganicwine.com.au/shop/organic-white.html" "Mozilla/5.0 (Windows NT 5.1; rv:41.0) Gecko/20100101 Firefox/41.0"
70.89.163.49 - - [05/Jan/2016:22:39:26 -0700] "GET /shop/images/cache/Wine/organic-sherry_thumb.190.jpg HTTP/1.1" 200 7733 "https://www.harrisorganicwine.com.au/shop/organic-white.html" "Mozilla/5.0 (Windows NT 5.1; rv:41.0) Gecko/20100101 Firefox/41.0"

When I look at my shop home page now, I get www.m. in the  category bar and if I refresh the page it is still there.  I used to have a website called m. harrisorganicwine.com.au that redirected to harrisorganicwine.com.au. I turned that off last month. Today I found a subdomain of that name and remove it. m. harrisorganicwine.com.au continues in the cat. bar.

Edited by harrisorganic
more info
Link to comment
Share on other sites

Well, clear the cache, then make a page request so that the navigation menu is rebuilt using the HOST you want (just www).

Here's what we know:
0. Assume the cache had just been cleared
1. Your domain has a wildcard in a CNAME record. This allows for anything.harrisorganicwine.com.au
2. The .htaccess directives to 301 bounce a http request to https does not correct anything to just www
3. Whatever is doing this cares naught whether the SSL Cert is invalid because of a mismatch with www
4. CubeCart will use the HOST to create the variable $GLOBALS['storeURL']
5. CubeCart uses $GLOBALS['storeURL'] to construct SEO URLS in the navigation menu
6. CubeCart caches a completely rendered box.navigation.php and element.navigation_tree.php templates
7. CubeCart will use the cached content and send it to the main.php template

CubeCart now has a cached navigation menu with anything in the URLs and will continue to use it until the cache is next cleared.

I think you can spot several points of interdiction to solve this.

Link to comment
Share on other sites

Seems to me that the htaccess code rewrite is not working. Testing the below with input url of http://www.harrisorganicwine.com.au

RewriteEngine on  
RewriteCond %{HTTPS} off   
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

The new url is https://www.harrisorganicwine.com.au/  Test are stopped, a redirect will be made with status code 301

other rules are required.

Line 75 in htaccess is turned off and if used gives http://www.harrisorganicwine.com.au/https\:\/\/www\.harrisorganicwine\.com\.au\/ which of course is not correct.

.htaccess

Edited by harrisorganic
Link to comment
Share on other sites

 

Please see the attached snippet regarding the statistics users online page 

The m. and the swanvalley.mobi are strange bed fellows.

 I don’t know if this is still an htaccess issue or a caching issue.  Any thoughts?

The site works OK , as I received two orders in the past 24hrs. 

CaptureCC6.PNG

Link to comment
Share on other sites

I would be interested in looking at the std log access file and finding 180.76.15.134, to learn what the initial referrer is.

The above shows page 2 having 48 items per page -- in Foundation, I think that represents the second or third time the "More" link was clicked.

If we can trace back the referrer item in the log file, we may be able to find what outside influence is causing this.

Link to comment
Share on other sites

Here is a section of yesterday's access log with baidu spider listed and perpage=96

96.31.66.245 - - [11/Jan/2016:05:31:04 -0700] "GET / HTTP/1.1" 200 14432 "-" "Pingdom.com_bot_version_1.4_(http://www.pingdom.com)"
180.76.15.134 - - [11/Jan/2016:05:31:46 -0700] "GET /shop/dry-reds.html?perpage=96 HTTP/1.1" 200 44467 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"
46.20.45.18 - - [11/Jan/2016:05:32:04 -0700] "GET / HTTP/1.1" 200 14432 "-" "Pingdom.com_bot_version_1.4_(http://www.pingdom.com)"

 

CC error log shows some repeated lines of:

[11-Jan-2016 13:22:17 Australia/Perth] PHP Warning:  Invalid argument supplied for foreach() in /home1/maketext/public_html/harrisorganicwine/shop/modules/gateway/Card_Capture/gateway.class.php on line 127
[11-Jan-2016 13:30:55 Australia/Perth] PHP Warning:  array_merge() [<a href='http://docs.php.net/manual/en/function.array-merge.php'>function.array-merge.php</a>]: Argument #2 is not an array in /home1/maketext/public_html/harrisorganicwine/shop/admin/sources/orders.index.inc.php on line 238

to add something else to the story.

Edited by harrisorganic
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...