Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google XML Sitemap SEO


Jack_mcs

Recommended Posts

ecartz

THANK YOU.

I am ALWAYS amazed by those that can find an error induced by a module other than the one that is failing.  Incorporating your change above solved the unescaped apostrophe.

I, myself, would have never looked outside of the module that I had just installed.

Thanks again.

BJ

Edited by Chadduck
Link to comment
Share on other sites

  • 2 months later...

@Jack_mcs

Your add on works fine to me, thank you for developing it.

I have some questions to the add on:

1. After first time installation, can i remove google_xml_sitemap_seo_install.php from the root directory or is it still required?
2. I have set up 2 languages in my shop, German (default) and English.
    a) Is this add on supporting multi lingual or just one language? 
    b) if only one language is supported, how do I tell google by the "xml files" my English description links eq parameters ?language=de or ?language=en?
        The description of articles, categories and manufactures in my shop are different in german and english!

Thanks for responding

 

Link to comment
Share on other sites

@Philo20051 - Yes, that file should be deleted. You should have seen a button to delete it when you ran the file.

2 - Unfortunately, it does not create multiple language map files. There's a way to do it manually but it requires editing files. If that was a one-time thing then it would be Ok for a temp solution. But this addon should be ran frequently so that is not a good solution. I've added this to things to do for the next version but it will not be completed anytime soon.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

1 hour ago, Jack_mcs said:

@Philo20051 - Yes, that file should be deleted. You should have seen a button to delete it when you ran the file.

2 - Unfortunately, it does not create multiple language map files. There's a way to do it manually but it requires editing files. If that was a one-time thing then it would be Ok for a temp solution. But this addon should be ran frequently so that is not a good solution. I've added this to things to do for the next version but it will not be completed anytime soon.

@Jack_mcs

Thanks for the fast respond!

1 - okay i deleted the file manually, maybe this should be mentioned at the end of point 3) in the "readme.txt"  file of the add on.

2 - okay thank you for adding it to you to do list, this seems important to me to be present on google in more than one language .

Have a nice day 🙂

Link to comment
Share on other sites

39 minutes ago, Philo2005 said:

1 - okay i deleted the file manually, maybe this should be mentioned at the end of point 3) in the "readme.txt"  file of the add on.

Did you make the database changes with the google_xml_sitemap_seo_install.php file? If so, it has a delete button. Did you not see that? I would think that button is more obvious than text in the install file. If the button is ignored then the text would be too, most likely.

Yes, the language is important. But I don't have multi-language sites so unless such a problem is mentioned, it won't be fixed because I won't be aware of it..

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

1 hour ago, Jack_mcs said:

Did you make the database changes with the google_xml_sitemap_seo_install.php file? If so, it has a delete button. Did you not see that? I would think that button is more obvious than text in the install file. If the button is ignored then the text would be too, most likely.

Yes you got me 😝 but all works fine 😎

Link to comment
Share on other sites

  • 5 months later...

Jack,

I have downloaded the latest version as in indicated in the LAST POST of the old thread (

)

but have run into another problem.  In the latest version, you added code for SECURE_IP to keep "just anyone" from being able to run the script manually. 

  if (! empty(GOOGLE_XML_SITEMAP_SECURE_IP)) {
     $safe_ips = explode(',', GOOGLE_XML_SITEMAP_SECURE_IP);
  
     if (! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) {
        header("location:http:127.0.0.1");
     }
  }

That new code throws a php error (that hebrew double colon error) since my site is on Godaddy and currently running php 5.4.  I have commented out that section of code and can now get it to run manually while I continue to work at getting my site moved to the latest OSC version on a new server running php 7.2.  However, it would be nice to have that 'protection' from anyone else executing the script until I get that completed.  Is there any OTHER way to provide that secure_ip check using the old 5.4 php?

Steve

Link to comment
Share on other sites

29 minutes ago, Steve80 said:

Is there any OTHER way to provide that secure_ip check using the old 5.4 php?

One of these should work:

if (defined('GOOGLE_XML_SITEMAP_SECURE_IP') && GOOGLE_XML_SITEMAP_SECURE_IP) {

or

if (strlen(GOOGLE_XML_SITEMAP_SECURE_IP) > 0 {

of 

if (GOOGLE_XML_SITEMAP_SECURE_IP == 'your IP') {

For the last one, enter your IP in place of your IP but leave the quotes.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the reply, Jack.  I have gotten it to work MANUALLY .. but only by COMMENTING OUT all that code about the secure_IP (in the index file).  I executed the 'install' for the update and it would APPEAR that the proper stuff got written to the db, but the additional options aren't showing up in Admin and I get instant errors with the 'secure_ip' code in there.  I still see the old options in Admin - just not the new ones (all about the IP options).  Did I miss something in the install process?  I got the followup page that gave me the DELETE or RESET options, but I didn't have enough info at the time to know which was appropriate, so I just went back to HOME.  I see the code in the install file that updated the db, but nothing that I recognize as 'enabling' them in the Configuration by Admin. I did check from phpMyAdmin that the new ( I think there are 4) items ARE there in the db .. immediately following the original options (I think there are 5).

Thoughts?

At least I can get the files created again by running it manually now. :-).

Steve

Link to comment
Share on other sites

@Steve80When you run the database script, click on the delete button and then install again. I think that will clean up the database. If not, you may need to do it manually. Be sure to delete all entries for it in the configuration_group and configuration tables.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

OK.. I hate to be DUMB.. but I AM that :-(.. So....

Using the DELETE option from the install file appears to have done NOTHING.  Running the install again also does nothing (new) as far as I can tell.

I WAS able to finally figure out that the original add-on installed GOOGLE XML SEO as _group = 289 in the configuration_group table and has the original options in the configuration table. The NEW version that I installed chose a different group_ID of 6502 - but that doesn't show in the configuration_group table.  I'm assuming THAT is the source of the problem.  Now.. just to be certain .. are you telling me to use phpMyAdmin to go into the Configuration table and DELETE all references to the options for the original version as well as all options for the new version.. then also go into the configuration_group table and also delete the entry for Google XML SEO .. and THEN run the install script file again and THAT should fix it all ??

Sorry.. just trying to make as certain as possible that I don't do something to HOSE my entire shop.

I'm assuming that after I delete all those items, I could go into my site Admin and see that the Google XML SEO option is GONE.. and then after REinstallation, it should come back .. and work correctly this time .. I hope.

Of course, while I'm having this issue, both FF And Chrome have decided that I don't have secure access to my phpMyAdmin so won't let me work on it.  Fortunately, MSIE still seems to work OK.  Something to do with TLS versions .. I guess GoDaddy is falling behind .. and so must MSIE.  Don't know how much longer MSIE is going to work.;

Steve

Edited by Steve80
Link to comment
Share on other sites

@Steve80Yes, you need to delete anything in the database that has to do with this addon in both tables. Once you do that, run the script again and you should be all set.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 months later...

Google XML Sitemap SEO - 1 0 7 9
 

Using the addon Google XML Sitemap SEO)  (https://apps.oscommerce.com/QN8hJ&google-xml-sitemap-seo)

I am getting some error message when running a cron job on php 7.1.1 of attached googlesitemap/index.php: 

PHP Notice:  Undefined index: SCRIPT_NAME in /home/www/web587/html/ishop/includes/system/segments/application/request.php on line 17
PHP Notice:  Undefined index: REMOTE_ADDR in /home/www/web587/html/ishop/googlesitemap/index.php on line 49
PHP Notice:  Undefined index: SCRIPT_FILENAME in /home/www/web587/html/ishop/googlesitemap/index.php on line 186
Status: 302 Found
X-Powered-By: PHP/7.1.1

 

 

Somebody can help me?

index.php

Link to comment
Share on other sites

The attached is the file from the latest, unreleased, version. It should fix the last two and maybe the first. But I can't cause the first to occur so I can't say for sure.

index.php

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

On 10/31/2020 at 5:56 PM, Jack_mcs said:

The attached is the file from the latest, unreleased, version. It should fix the last two and maybe the first. But I can't cause the first to occur so I can't say for sure.

index.php

PHP Notice:  Undefined index: SCRIPT_NAME in /home/www/web587/html/ishop/includes/system/segments/application/request.php on line 17
X-Powered-By: PHP/7.1.1

The last 2 errors are gone, thank you.
The first message stays, attached the file of request.php of version 1 0 7 9.
The following statement (line 17) in request.php generates the message:
$PHP_SELF = substr(parse_url($_SERVER['SCRIPT_NAME'])['path'], strlen(DIR_WS_CATALOG));

Any idea?

request.php

Link to comment
Share on other sites

That's not part of this addon. It might be caused by something in the addon but without being able to duplicate it, I can't trace it. But it is saying that $_SERVER['SCRIPT_NAME'] is not set and that is correct when running from a cron job so please see if this will fix it. In the index.php file, find this code

    if (isset($_SERVER['REMOTE_ADDR']) && ! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) {
        header("location:http:127.0.0.1");
     }
     

and replace it with this

     if (isset($_SERVER['REMOTE_ADDR'])) {
        if (! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) {
          header("location:http:127.0.0.1");
        }  
     } else {
        $_SERVER['REMOTE_ADDR'] = $safe_ips[0];
     } 

Be sure to enter your IP in the secure setting in admin for this addon.

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

13 hours ago, Philo2005 said:

PHP Notice:  Undefined index: SCRIPT_NAME in /home/www/web587/html/ishop/includes/system/segments/application/request.php on line 17
X-Powered-By: PHP/7.1.1

 

Additional information:
This message is shown only when running the cron job, when doing online creation this message is not shown.
I found out that IP address of my cron job is 0.

Link to comment
Share on other sites

15 hours ago, Jack_mcs said:

That's not part of this addon. It might be caused by something in the addon but without being able to duplicate it, I can't trace it. But it is saying that $_SERVER['SCRIPT_NAME'] is not set and that is correct when running from a cron job so please see if this will fix it. In the index.php file, find this code


    if (isset($_SERVER['REMOTE_ADDR']) && ! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) {
        header("location:http:127.0.0.1");
     }
     

and replace it with this


     if (isset($_SERVER['REMOTE_ADDR'])) {
        if (! in_array($_SERVER['REMOTE_ADDR'], $safe_ips)) {
          header("location:http:127.0.0.1");
        }  
     } else {
        $_SERVER['REMOTE_ADDR'] = $safe_ips[0];
     } 

Be sure to enter your IP in the secure setting in admin for this addon.

okay i will try on tonight's cron job.

Link to comment
Share on other sites

7 hours ago, Philo2005 said:

okay i will try on tonight's cron job.

PHP Notice:  Undefined index: SCRIPT_NAME in /home/www/web587/html/ishop/includes/system/segments/application/request.php on line 17
X-Powered-By: PHP/7.1.1

Still the same message appears!

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...