Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google XML Sitemap SEO


Jack_mcs

Recommended Posts

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 same notification 😞

i added some echo commands to dump some variables on the index.php file for tomorrows run at night.
These should be shown in the generated mail confirmation.
 

 

Edited by Philo2005
Link to comment
Share on other sites

The file I uploaded doesn't use the application_top file at all so I don't know how you are seeing that now. But it isn't something I can test since I don't have a live shop of that version of Phoenix so I can't help any further at this point. It is just a warning, as opposed to a fatal error, so  it can be ignored.  Set the cron job to ignore the output if you don't want to see 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

well,  the online version runs without notice and works correct, so if the cron job fails, i will run the online version afterwards to make sure, the sitemaps file will be generated properly.
Anyway if I find something, i will let you know.

thanks for helping.

Edited by Philo2005
Link to comment
Share on other sites

7 hours ago, Philo2005 said:

so if the cron job fails,

To be clear,  the warning you are seeing is not fatal so the cron job should complete. Have you checked the sitemaps after the cron job runs to see if they are updated?

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 weeks later...
On 11/4/2020 at 4:31 PM, Jack_mcs said:

To be clear,  the warning you are seeing is not fatal so the cron job should complete. Have you checked the sitemaps after the cron job runs to see if they are updated?

yes it is just a warning.

Link to comment
Share on other sites

I found out why the warnings comes up.

I renamed the index.php file to gsm_prc.php.
I adjusted the configuration table setting for 'GOOGLE_XML_SITEMAP_CREATE_NOW' to the new name of the script.

(This because there is already an index.php file on Phoenix root directory which could be a problem.)

The cron job could not attach the include files correctly because of wrong directory settings by the cron job itself.
I therefore set the directory setting to the actual of the script.php when not running a browser online request.

Here I have a proposal of how this could be solved:
 

//  set correct working directory for crown job
//  and select main directory for all
//  ------------------------------------------------------------
//    chdir('/home/user/web/domain.com/public_html/catalog/googlesitemaps/');
    if (! isset($_SERVER['HTTP_USER_AGENT'])) { // cron job
                chdir(__DIR__ . '/');
    }
    chdir('../');

What do you think?

 

Link to comment
Share on other sites

3 hours ago, Philo2005 said:

What do you think?

Looks good. As long as the map files are created and are correct, 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

4 hours ago, Jack_mcs said:

Looks good. As long as the map files are created and are correct, you should be all set.

You may add this statement to your version, cron jobs will not always take over the directory settings according the online requests.
So for me the script works fine with Phoenix 1 0 7 10 without errors and warnings.

Link to comment
Share on other sites

There shouldn't be a reason to do that but since I can't test it, I may be wrong. I will keep this mind when I get around to do that. Thank you for posting 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 year later...

Just installed latest version of Google XML Sitemap SEO V 1.15

Installs and runs ok, except it redirects to /googlesitemap/127.0.0.1 and 404s (on my wamp test bed). The sitemaps were created fine. http://127.0.0.1/catalog/ is fine as a reference.

Only way to get it to complete and generate and redirect correctly to /googlesitemap/index.php was to remove the Manual IP & the Secure IP references and leave blank.

What should happen with 127.0.0.1 configured?

Where are the priorities assigned? Noticed products values from 0.1 through to 1.0, but not obvious why.

Link to comment
Share on other sites

Sounds like your redirect line for your WAMP installation is not correct. I routinely run it in my local shops and it works as expected. You can turn on the diagnostic setting to see the paths it is using, which may help find the problem. But since the maps are not usable by the search engines you would just be wasting time trying to find the cause, in my opinion. Upload it to a live shop and run it there and you should see it works correctly.

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

47 minutes ago, Jack_mcs said:

Sounds like your redirect line for your WAMP installation is not correct. I routinely run it in my local shops and it works as expected. You can turn on the diagnostic setting to see the paths it is using, which may help find the problem. But since the maps are not usable by the search engines you would just be wasting time trying to find the cause, in my opinion. Upload it to a live shop and run it there and you should see it works correctly.

You're probably correct - updated live sites and all is hunky dory.

How are the sitemap priorities assigned?

Is there an equivalent SEO contribution for the google product feed? (currently using feedmachine)

Link to comment
Share on other sites

1 hour ago, lee the bean said:

How are the sitemap priorities assigned?

They are calculated based on the number of orders.

 

1 hour ago, lee the bean said:

Is there an equivalent SEO contribution for the google product feed?

Yes, it is the Google Feeder addon.

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

  • 4 months later...

A new version has been uploaded with these changed:

  • Corrected code to run correctly via cron or the shop.
  • Fixed some php warnings for 7.3+.

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

new version has been uploaded with these changed:

  • Corrected code to run correctly via cron or the shop.
  • Fixed some php warnings for 7.3+.

 

Hi Jack, having been using this for years and now on Phoenix 1.0.8.16 the only sitemap generated is for the products, not the rest. any ideas would be appreciated.

Link to comment
Share on other sites

@artfulwebI don't have a test shop set up with that version of Phoenix so I can't test it but this latest version shouldn't cause any problems like that. Did it just start failing with this version? If this is the first time you installed it into that version of Phoenix you could try the previous version to verify where if the problem is in this version or not. 

Is the sitemap_index.php file created and, if so, does it have the link for the categories or just the products?

Please enable the diagnostic setting and post the results here.

 

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

Hi Jack, having been trying everything. When I click to generate the maps a new page opens but blank. Nothing in the error logs. Tried the diagnostic but nothing shows. There is no sitemap_index.php.

I had had the previous version installed but it only did the products sitemap so I hoped this version would fix it but the result is the same and as the googlesitemap/index.php is blank I do not know where to look.

That said, the only other change to the site was the add of Name Based URLs which gives the same result as Ultimate SEO URLs ( which had bugged on this version  of Phoenix though installed for years so I gave the other a try as it is a live site, sorry).

Link to comment
Share on other sites

Finally got an error in my logs

PHP Fatal error:  Uncaught Error: Undefined constant "DIR_WS_HTTPS_CATALOG" in /xx/xx/xx/xx/includes/application_top.php:52
Stack trace:
#0 /xx/xx/xx/xx/index.php(13): require()
#1 {main}
  thrown in /xx/xx/xx/xx/includes/application_top.php on line 52

Line 52 is

          tep_redirect(HTTP_SERVER . DIR_WS_HTTPS_CATALOG . 'googlesitemap/index.php');  //   
 

Link to comment
Share on other sites

6 hours ago, artfulweb said:

That said, the only other change to the site was the add of Name Based URLs which gives the same result as Ultimate SEO URLs ( which had bugged on this version  of Phoenix though installed for years so I gave the other a try as it is a live site, sorry).

I am not familiar with that addon but if there is a way to turn it off try that. The latest version of Ultimate SEO will work with the newer versions of Phoenix but is only available as a Pro version at this point.

 

6 hours ago, artfulweb said:

PHP Fatal error:  Uncaught Error: Undefined constant "DIR_WS_HTTPS_CATALOG"

The change to the application_top file is only needed if you can't run a cron job. It could be moved to a hook but I didn't think anyone was using that nowadays. In any event, the DIR_WS_HTTPS_CATALOG is not used in Phoenix. If you can't run a cron job and need that code, add that define to your configure file and set it to your shops directory, like 

define('DIR_WS_HTTPS_CATALOG', '/');

or 

define('DIR_WS_HTTPS_CATALOG', '/catalog');

 

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

Hi Jack, I set up a testing site, vanilla install of Phoenix 1.0.8.16 and it works perfectly. Now I need to figure out which of my add-ons or rewriting rules create the problem. Sorry to have bothered you but at least for others I can confirm that it does work on a vanilla installation!

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...