Jump to content
bumbarash

[Contribution] iOSC - mobile version of OSC on your iPhone

Recommended Posts

Just to further my post above, I have been disabling addons one by one all morning to try and narrow the issue down.

 

I can confirm, when I turn "enable seo urls 5" to false, I can no longer reproduce the issue by bookmarking the site.

 

So it would seem, apple touch icons, header tags SEO, my custom 404 error page and header status handler are all ok.

 

Its something in seo urls 5, in particular I presume, something to do with the changes or additions for mobile.

Share this post


Link to post
Share on other sites

@@raiwa thank you. That script works (doesn't cause a redirect loop error) unfortunately it does not help the issue of mentioned above;

 

 

 

I haven't figured out the cause yet, however, I can reproduce the issue now on command. I had installed the apple touch icon addon here; http://addons.oscommerce.com/info/7646

 

So, I had presumed the issue was ONLY caused by bots - it is not. The issue happens to some degree every time a real customer (not a bot) bookmarks the site from an apple mobile device. As I said above, I can recreate the issue by bookmarking the site.

 

This leads me to believe there is an issue with apple touch addon (or my install of the addon) - @@Gergely , any input you can provide would be greatly appreciated. The apple touch icon is located in the root - see my posts above, why would it be looking at the /mobile/ dir for apple-touch-icon.png (leading to a 404 error)? I have updated my apple touch addon from the Fed. 2013 release to the Nov. 2013 and changing my mobile/includes/header.php from;

 

<?php
$oscTemplate->buildBlocks();
echo $oscTemplate->getBlocks('header_tags');
?>

 

to

 

<?php
echo $oscTemplate->getBlocks('mobile_header_tags');
echo $oscTemplate->getBlocks('header_tags');
?>

 

But it doesn't help. BTW, which is correct?

 

The apple touch icon issue is just a symptom of the actual issue. Because the issue will happen on many 404 pages in the /mobile/ directory.

 

Thoughts?????

 

Hello Scott @@greasemonkey,

 

Now we come closer, I didn't know that this is a standard Header tags module. I downloaded the add-on and had a look on it.

This line is ok:

<?php $oscTemplate->buildBlocks(); echo $oscTemplate->getBlocks('header_tags'); ?>

Just do the mods explained in the install doc.

What you should do is to update to Mobile osc 7.3.1., in 7.3.0. there are some mods missing and it didn't work correct with all header tag modules (title tags etc).

 

@@Gergely, I would like to add your mobile header tags to the iosc mobile core package, is it ok for you?

 

regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa couple of issues with the upgrade/instructions.

 

1) I'm getting this in on product_info where the social bookmarks should be; Fatal error: Cannot redeclare class language in /home/*******/public_html/sandbox/includes/classes/language.php on line 16. There is no language file for the new mobile/includes/modules/product_social_bookmarks.php module. Shouldn't there be?

 

2) in step 1a you are asking to upload; for_OsC_2.3.3.3_2.3.3.4/mobile/includes/modules/product_header.php

 

Then in step 9 you are adding (to this file);

 

<?php
		if (MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS == 'True') {
			?><div style="text-align:center;"><?php include(DIR_MOBILE_MODULES . 'product_social_bookmarks.php'); ?></div><?php
		}
		?>

 

Which is already included in the new file loaded in step 1a.

 

Let me know about the language file (or did I miss something - apologies if I missed it).

 

Share this post


Link to post
Share on other sites

@@raiwa couple of issues with the upgrade/instructions.

 

1) I'm getting this in on product_info where the social bookmarks should be; Fatal error: Cannot redeclare class language in /home/*******/public_html/sandbox/includes/classes/language.php on line 16. There is no language file for the new mobile/includes/modules/product_social_bookmarks.php module. Shouldn't there be?

 

2) in step 1a you are asking to upload; for_OsC_2.3.3.3_2.3.3.4/mobile/includes/modules/product_header.php

 

Then in step 9 you are adding (to this file);

 

<?php
		if (MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_STATUS == 'True') {
			?><div style="text-align:center;"><?php include(DIR_MOBILE_MODULES . 'product_social_bookmarks.php'); ?></div><?php
		}
		?>

 

Which is already included in the new file loaded in step 1a.

 

Let me know about the language file (or did I miss something - apologies if I missed it).

 

Hello Scott @@greasemonkey,

 

For point 1, the language files are included individually in each social bookmark. Try switching on the bookmarks one by one to check which one produces the error.

 

For pont 2: yes I forgot to mention that this is alternative, or upload the new file or modify the old one, sorry.

 

regards

Rainer

Share this post


Link to post
Share on other sites
For point 1, the language files are included individually in each social bookmark. Try switching on the bookmarks one by one to check which one produces the error.

 

@@raiwa it was Google+ Share - I confirm I have a language file at /includes/languages/english/modules/social_bookmarks/sb_google_plus_share.php

 

 

Now that Google+ Share is disabled the rest of my enabled modules (FB, Twitter and Pinterest) work perfect, however, I'm left with no title

MODULE_BOXES_PRODUCT_SOCIAL_BOOKMARKS_BOX_TITLE
. I can confirm I have this line at /includes/languages/english/modules/boxes/bm_product_social_bookmarks.php

 

Both the title and Google+ Share are working fine in my desktop store (and live site).

 

Sorry, I'm not sure... but I don't think I have missed anything?

Share this post


Link to post
Share on other sites

Hello!

Tahnks for great addon!

I have problem, I installed support for header tags seo addon and in result have this in desktop page: <title>Replace me in Page Control under index.php - oscommerce-solution.com</title> <meta name="Description" content="Replace me in Page Control under index.php - oscommerce-solution.com"> <meta name="Keywords" content="Replace me in Page Control under index.php - oscommerce-solution.com"> <meta http-equiv="Content-Language" content="ru-RU"> <meta name="googlebot-mobile" content="noindex, nofollow"> <meta name="MSNBOT_Mobile" content="noindex, nofollow"> <meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow"> <meta name="robots" content="noodp"> <meta name="revisit-after" content="1 days"> <meta name="robots" content="index, follow"> <meta name="Reply-to" content="uznemumsv@gmail.com"> <link rel="alternate" media="only screen and (max-width: 640px)" href="http://vaciesuuznemums.lvhttp://vaciesuuznemums.lv/g//mobile/"> <!-- EOF: Header Tags SEO Generated Meta Tags -->

Share this post


Link to post
Share on other sites

also canonical doesnt work.

I have installed latest header tags seo.

 

Hello @@gvv,

 

The Header tags mobile support is for version HeaderTags_SEO_V_3.3.0, not 3.3.1. There are a lot of changes in the latest version.

 

regards

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@raiwa it was Google+ Share - I confirm I have a language file at /includes/languages/english/modules/social_bookmarks/sb_google_plus_share.php

 

 

Now that Google+ Share is disabled the rest of my enabled modules (FB, Twitter and Pinterest) work perfect, however, I'm left with no title . I can confirm I have this line at /includes/languages/english/modules/boxes/bm_product_social_bookmarks.php

 

Both the title and Google+ Share are working fine in my desktop store (and live site).

 

Sorry, I'm not sure... but I don't think I have missed anything?

 

Hello Scott @@greasemonkey,

 

I just rechecked on my test and livestore and Google + share works without any problem. Try to check installation.

Share this post


Link to post
Share on other sites

@@raiwa, I have figured out the issue with the install... It was header tags seo. The changes to mobile/includes/header.php need to be duplicated in header_with_products_htseo.php and header_with_htseo.php.

 

Now on to testing the earlier issue

mobile/my-bad-link.php get a 404 and so move on to mobile/mobile/my-bad-link.php then mobile/mobile/mobile/my-bad-link.php etc etc

 

I have rechecked in my sandbox store by bookmarking from my iphone and it would seem there is still no change. See the attached screenshot of how many requests the bookmark makes.

post-270094-0-60941500-1391263457_thumb.png

Share this post


Link to post
Share on other sites

@@raiwa, I have figured out the issue with the install... It was header tags seo. The changes to mobile/includes/header.php need to be duplicated in header_with_products_htseo.php and header_with_htseo.php.

 

Now on to testing the earlier issue

 

I have rechecked in my sandbox store by bookmarking from my iphone and it would seem there is still no change. See the attached screenshot of how many requests the bookmark makes.

 

Hello Scott @@greasemonkey,

 

Do you think you need both, Header Tags SEO and core Header Tags?

 

I only could imaging that it may be related to the image path definition in ht_apple_touch.php:

  if( file_exists( DIR_FS_CATALOG . MODULE_HEADER_TAGS_APPLE_TOUCH_ICON_FILE ) && is_file( DIR_FS_CATALOG . MODULE_HEADER_TAGS_APPLE_TOUCH_ICON_FILE ) ) {
    return tep_image(HTTP_SERVER . DIR_WS_CATALOG . MODULE_HEADER_TAGS_APPLE_TOUCH_ICON_FILE, '', '48', '48' );

 

But this is a specific issue of this file and I would ask @@Gergely for help.

 

Regards

Rainer

Share this post


Link to post
Share on other sites

Very good point. I'm not sure? I use header tags seo in the desktop site so had just presumed I would have to use the same in the mobile.

 

I can always un-do all the header tag seo mobile changes to test - then implement @@Gergely for mobile. Does think make sense?

Share this post


Link to post
Share on other sites

Fix for the missing SEO URL support (Url correction to classic site URLs in iosc mobile 7.3.1). I'll add it to the next update.

Here the change:

In mobile/includes/modules/product_social_bookmarks.php:

find:

    }
  }
echo str_replace(urlencode(HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE), urlencode(HTTP_SERVER . DIR_WS_HTTP_CATALOG), $data);

replace with:

	  $str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mpri-', '-mp-', '-mm-', 'catalog_mb.php', 'about.php',  'search.php', 'options.php', urlencode(HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE), '?redirectCancelled=true', '&redirectCancelled=true');
	  $str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-pri-', '-p-', '-m-', 'index.php', 'index.php', 'index.php', 'index.php', urlencode(HTTP_SERVER . DIR_WS_HTTP_CATALOG));
	  $data = str_replace($str_replace_from, $str_replace_to, $data);
    }
  }
echo $data;

Share this post


Link to post
Share on other sites

Did the upgrade from from iOSC 5.4rev2 for OsC 2.3 to Mobile OSC 6.0rev3 for OsC 2.3

 

Turning on the MOBILE_SITE blanks out all my webpages...so appears to be problem with mobile_redirect.php

 

Was wondering if problem has anything to do with this in config.php:

 

define('DIR_FS_MOBILE', '/web/htdocs/www.yesichangedthis.com/home/mobile/');

 

Not sure if the /web/htdocs/ is correct. I am on a standard Apache system

 

Looking for any clues....!!!!!!

Share this post


Link to post
Share on other sites

Referencing my above comment: I found the missing instructions for configuring a subdirectory mobile site. If I am not mistaken they were missing from the 7.3.1 full package download.

 

So I have configure.php fixed with define('DIR_FS_MOBILE', DIR_FS_CATALOG . 'mobile/');

 

However I am confused with the installation instructions that say to delete the file /mobile/includes/configure.php then make a change to the classic site application_top.php as below:

 

require((defined('MOBILE_SESSION') ? 'web/htdocs/www.mystoreurl.com/home/includes/configure.php' : 'includes/configure.php'));

 

Why make a change at all if not using the mobile configure file, and what to do with the "web/htdocs/ ???

 

Thanks for any help..

Share this post


Link to post
Share on other sites

I must have something wrong in the setup. When trying to access the mobile files (in the /catalog/mobile folder) ,

 

/mobile/index.php

calls

/mobile/includes/application_top.php

which then calls

/catalog/includes/application_top.php

which cant call anything because good ol' app_top is nested within /mobile/index.php thus one directory "off "

 

Yelp!

Share this post


Link to post
Share on other sites

All my paths are off when calling for modules internally with "include" or "require" ...this is based on me starting the mobile site from within the mobile directory, with a link to say /mobile/index.php

 

Am I missing something about how the mobile site is started and/or linked to...? This is blowing my mind. It hurts. Really hurts. Ouch.

Share this post


Link to post
Share on other sites

I must have something wrong in the setup. When trying to access the mobile files (in the /catalog/mobile folder) ,

 

/mobile/index.php

calls

/mobile/includes/application_top.php

which then calls

/catalog/includes/application_top.php

which cant call anything because good ol' app_top is nested within /mobile/index.php thus one directory "off "

 

Yelp!

Referencing my above comment: I found the missing instructions for configuring a subdirectory mobile site. If I am not mistaken they were missing from the 7.3.1 full package download.

 

So I have configure.php fixed with define('DIR_FS_MOBILE', DIR_FS_CATALOG . 'mobile/');

 

However I am confused with the installation instructions that say to delete the file /mobile/includes/configure.php then make a change to the classic site application_top.php as below:

 

require((defined('MOBILE_SESSION') ? 'web/htdocs/www.mystoreurl.com/home/includes/configure.php' : 'includes/configure.php'));

 

Why make a change at all if not using the mobile configure file, and what to do with the "web/htdocs/ ???

 

Thanks for any help..

 

Hello @@MountainMan,

 

This is correct. The mod in catalog/includes/application_top.php refers to the core configure.php:

catalog/includes/configure.php

It's the mobile configure.php to be deleted:

catalog/mobile/includes/configure.php

 

For all the other trouble, please try this:

 

Recheck all modifications in the core oscommerce files using the installation instructions for a new installation included in iosc mobile vers. 7.3.1.

In particular check the modifications in the following files:

- catalog/includes/configure.php

- catalog/includes/application_top.php

- catalog/includes/functions/general.php

- catalog/includes/functions/html_output.php

- the classic_site URL definition in catalog/mobile/catalog_mb.php

- the classic link in catalog/mobile/incudes/footer.php

Make sure you are using the newest versions of the redirect files:

- catalog/mobile/includes/classes/mobile_redirect.php

- catalog/mobile/includes/classes/mobile_redirect_subdomain.php

If you are using SEO URLs, you need to update the SEO URL support files and the mobile rewrite rules in .htaccess. See the last version of the add-on support package.

 

Kind regards

Rainer

Share this post


Link to post
Share on other sites

@@raiwa I have un-done the update for now. As it did not fix my problem and my problem was much more important;

 

mobile/my-bad-link.php get a 404 and so move on to mobile/mobile/my-bad-link.php then mobile/mobile/mobile/my-bad-link.php etc etc

 

I have however come to a partial solution - although the solution is not very graceful.

 

The issue above arose every time a 404 page was called from a /mobile/ link - example by a human bookmarking our site from an iphone the addon called mobile/apple_touch_icon.png (which is 404)

 

OR any deleted/404 product that a bot or human was looking for in the from a "classic" link on a mobile device. Previously I had installed http://addons.oscommerce.com/info/933 for a custom 404 page and http://addons.oscommerce.com/info/8865 and then edited /includes/modules/ultimate_seo_urls5/includes/notfound_404.php to

 

header( "HTTP/1.0 404 Not Found" );
header('Location: http_error.php?error_id=404&FWR-URL='. $_SERVER['REQUEST_URI']); ?>

 

This all worked very well... on the classic site but not at all on the mobile site.

 

Solution;

 

1) for the apple_touch_icon I just made a copy of the png file in the /mobile/ directory. Fixed... for now. @@Gergely have you experienced any issues with this addon similar to mine? If you wish I can take this to a different thread...

 

2) for all other 404 issues I re-made the http_error.php (you are welcome to a copy of this for the support addons) for mobile and dropped it in at mobile/http_error.php

 

So, for now everything seems to look great.

 

When a know 404 page is checked here http://seo-website-designer.com/404-Error-Handler-Checker#heading-ToolResult in my mobile dir links return a good 404 header

 

Most importantly.... the server isn't getting slammed anymore...

 

 

Share this post


Link to post
Share on other sites

I obviously need to give myself a little schoolin'. There are some css technologies going on that I am unfamiliar with. I was hoping someone could point me to what I need to study.

 

I notice there are div's with classes not in my source code that turn up on the page in the browser. Generated on the fly somehow. Kind of forcing styles on the page, and working against me! They seem to be of the "ui-xxxxx" genre. What in the world is this? Where do I look to learn?

 

Thanks

Share this post


Link to post
Share on other sites

@@raiwa I have un-done the update for now. As it did not fix my problem and my problem was much more important;

 

 

 

I have however come to a partial solution - although the solution is not very graceful.

 

The issue above arose every time a 404 page was called from a /mobile/ link - example by a human bookmarking our site from an iphone the addon called mobile/apple_touch_icon.png (which is 404)

 

OR any deleted/404 product that a bot or human was looking for in the from a "classic" link on a mobile device. Previously I had installed http://addons.oscommerce.com/info/933 for a custom 404 page and http://addons.oscommerce.com/info/8865 and then edited /includes/modules/ultimate_seo_urls5/includes/notfound_404.php to

 

header( "HTTP/1.0 404 Not Found" );
header('Location: http_error.php?error_id=404&FWR-URL='. $_SERVER['REQUEST_URI']); ?>

 

This all worked very well... on the classic site but not at all on the mobile site.

 

Solution;

 

1) for the apple_touch_icon I just made a copy of the png file in the /mobile/ directory. Fixed... for now. @@Gergely have you experienced any issues with this addon similar to mine? If you wish I can take this to a different thread...

 

2) for all other 404 issues I re-made the http_error.php (you are welcome to a copy of this for the support addons) for mobile and dropped it in at mobile/http_error.php

 

So, for now everything seems to look great.

 

When a know 404 page is checked here http://seo-website-designer.com/404-Error-Handler-Checker#heading-ToolResult in my mobile dir links return a good 404 header

 

Most importantly.... the server isn't getting slammed anymore...

 

Hello Scott @@greasemonkey,

 

adding your 404 support to the package would be great. You can upload it yourself or send me the files and instructions and I'll add it to the next update. You got my mail?

 

thanks a lot and kind regards

Rainer

Share this post


Link to post
Share on other sites

I obviously need to give myself a little schoolin'. There are some css technologies going on that I am unfamiliar with. I was hoping someone could point me to what I need to study.

 

I notice there are div's with classes not in my source code that turn up on the page in the browser. Generated on the fly somehow. Kind of forcing styles on the page, and working against me! They seem to be of the "ui-xxxxx" genre. What in the world is this? Where do I look to learn?

 

Thanks

 

Hello @@MountainMan,

 

You can find jquery mobile specific information, demos and coding examples here: http://demos.jquerymobile.com/1.3.2/

 

regards

Rainer

Share this post


Link to post
Share on other sites

Thanks for the info on CSS. I had found the new (to me) jquery stuff based on this in the iOSC code:

 

<body class="ui-mobile-viewport ui-overlay-c">

 

I also found other folks confused by the same issue of the CSS being forced on them and needing to over-ride it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×