Zen Cart Logo

SitemapXML v.2

Views: 613,608

Results 1,241 to 1,260 of 2,226
2 Apr 2013, 10:53 AM
#1241
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

SitemapXML v.2

carousel1:

using 1.51 zen cart
please anyone can help for these error :

"Can not create file "/home/webusers/xxxxxxxx/xxxxxxxxxxxx.com/www/sitemap/sitemapmainpage.xml". You may need to use your webhost control panel/file-manager to change the permissions effectively."

i did set the permission for folder sitemap xml to 777 already but still can not get the right thing, please help.....thanks.

I do not know, do not understand what the matter was. Can be a file /home/webusers/xxxxxxxx/xxxxxxxxxxxx.com/www/sitemap/sitemapmainpage.xml exists and is read-only?

2 Apr 2013, 8:22 PM
#1242
carousel1 avatar

carousel1

New Zenner

Join Date:
Feb 2013
Posts:
51
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

I do not know, do not understand what the matter was. Can be a file /home/webusers/xxxxxxxx/xxxxxxxxxxxx.com/www/sitemap/sitemapmainpage.xml exists and is read-only?

but i already set to 777 for the sitemap directory??? any other suggestion for these error? thanks.

3 Apr 2013, 1:01 AM
#1243
mike_1 avatar

mike_1

New Zenner

Join Date:
Mar 2013
Posts:
4
Plugin Contributions:
0

Re: SitemapXML v.2

ZC v1.5.1
SiteMapXML (3.2.6 17.06.2012 16:13)

I have zencart installed in directory after root: root/zencart
I have: root/zencart/sitemap

I was required to set permissions at: 0777 for sitemap folder for sitemap to create files in this folder.

When sitemap writes "sitemap.xml", it's trying to create in the root directory... which is not 777.

Is it required in the root dir for search engines to function ? Can we place it in the sitemap folder and get the seo desired results ?

Is there solution for this problem? or maybe it's not sitemap module issue but my server is not setup for proper RW permissions ?

I get the error below.

ERROR: Sitemap Index
Can not create file "/home/partsdis/public_html/warehouse2/sitemap.xml". You may need to use your webhost control panel/file-manager to change the permissions effectively.

Thank you for your hard work creating sitemap...

3 Apr 2013, 10:10 AM
#1244
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

carousel1:

but i already set to 777 for the sitemap directory??? any other suggestion for these error? thanks.
You set 0777 for the directory, but not for existing files in this directory. If they are there - check what files are in this directory.

The problem occurs only with this file, other files are ok?

3 Apr 2013, 11:46 AM
#1245
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Hi, Mike!

Mike':

ZC v1.5.1
SiteMapXML (3.2.6 17.06.2012 16:13)

I have zencart installed in directory after root: root/zencart
I have: root/zencart/sitemap

I was required to set permissions at: 0777 for sitemap folder for sitemap to create files in this folder.

When sitemap writes "sitemap.xml", it's trying to create in the root directory... which is not 777.
This is a bug - I'll check it. It should not be.
Please, check your configure.php, constant DIR_FS_CATALOG - what path defined in this constant?

Mike':

Is it required in the root dir for search engines to function ?
No

Mike':

Can we place it in the sitemap folder and get the seo desired results ?
In theory - yes, we can. Practically - need to update script sitemapxml, add new option - place the index file. I'm afraid it will complicate the use. And so many are confused about the basic things.

3 Apr 2013, 1:25 PM
#1246
mike_1 avatar

mike_1

New Zenner

Join Date:
Mar 2013
Posts:
4
Plugin Contributions:
0

Re: SitemapXML v.2

or maybe it's not sitemap module issue but my server is not setup for proper RW permissions ?

I was able to correct the 0777 permissions issue: suPHP was off, I turned it on and chmod the folders 0750. All sitemap files are now created in designated folders.

root/zencart/sitemap/ = 5 files
&
root/zencart/sitemap.xml

Most likely >>>>> > When sitemap writes "sitemap.xml", it's trying to create in the root directory... which is not 777. is a mistake on my part due to the late night hour. Reading my previous post, it's obvious it was trying to create in the zen folder.

Thank you

4 Apr 2013, 6:00 AM
#1247
carousel1 avatar

carousel1

New Zenner

Join Date:
Feb 2013
Posts:
51
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

You set 0777 for the directory, but not for existing files in this directory. If they are there - check what files are in this directory.

The problem occurs only with this file, other files are ok?

actually all files can not be create so what's the solution for these, thanks.

4 Apr 2013, 7:52 AM
#1248
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

carousel1:

actually all files can not be create so what's the solution for these, thanks.
Hmmm..... I do not know. If you give access to FTP, then I can try to sort out the problem.

4 Apr 2013, 10:58 AM
#1249
carousel1 avatar

carousel1

New Zenner

Join Date:
Feb 2013
Posts:
51
Plugin Contributions:
0

Re: SitemapXML v.2

rastabandita:

same for me

please any solution for the error, thanks.

4 Apr 2013, 1:29 PM
#1250
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: SitemapXML v.2

carousel1:

please any solution for the error, thanks.

HOW did you "change permissions" ?

If you used FTP to set permissions to 777, make sure that the permissions actually DID CHANGE.

Some webhosts do not allow changes to 777 via FTP (for security reasons) and 777 has to be set via C-Panel.

5 Apr 2013, 2:01 PM
#1251
carousel1 avatar

carousel1

New Zenner

Join Date:
Feb 2013
Posts:
51
Plugin Contributions:
0

Re: SitemapXML v.2

schoolboy:

HOW did you "change permissions" ?

If you used FTP to set permissions to 777, make sure that the permissions actually DID CHANGE.

Some webhosts do not allow changes to 777 via FTP (for security reasons) and 777 has to be set via C-Panel.

i used c-panel changed permissions to 777 for folder "sitemap xml" under modules and under templates...
then send
Attachment 12304
then resulted these errors
Attachment 12305

5 Apr 2013, 2:40 PM
#1252
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

carousel1:

i used c-panel changed permissions to 777 for folder "sitemap xml" under modules and under templates...
You set 777 for what folders??? For folder "sitemap xml" under **modules **and under templates???

5 Apr 2013, 3:11 PM
#1253
carousel1 avatar

carousel1

New Zenner

Join Date:
Feb 2013
Posts:
51
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

You set 777 for what folders??? For folder "sitemap xml" under **modules **and under templates???

which folder should i set?

6 Apr 2013, 9:17 AM
#1254
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: SitemapXML v.2

a_berezin:

Sorry, but I don't use ceon uri mapping and i don't know why ceon uri mapping don't "mapping" this urls.
Try to "force rebuild" sitemaps.

From Conor:

conor:

Hi,
Must be a problem with that module. Ceon URI Mapping will output the static URI for any code that uses zen_href_link(). It has no concept of what module is using it via that function.

Best ask your question on the thread for this other module.

Sorry I can't be more help than that but at least you know the issue isn't with Ceon URI Mapping.

All the best..

Conor
ceon

conor:

Hi,
I would have expected mysite/test as well.. I'm afraid all I can say is that you should check out what way the Sitemap XML module is calling zen_href_link()... Ceon URI Mapping will always return the static URI if that function is called with the correct parameters.

Sorry, I don't have the time to debug this for you.. I hope you find the solution quickly!

If you do, and it requires the Sitemap XML module to be fixed, please let its author know and update us here too. :)

All the best..

Conor
ceon

6 Apr 2013, 11:26 AM
#1255
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Hi,

DivaVocals:

From Conor:
I fully agree with Conor:
conor:

Sorry, I don't have the time to debug this for you..
I have already said that I do not use and do not intend to use the module CEON URI Mapping, so I can't quickly check. On a more serious research I have neither the time, nor the desire.

If the error is manifest in a different situation, of course, I will search for bug and fix it.

By the way, it is likely that in the latest version 3.2.9 this bug has already does not manifest itself, because in the latest version were corrected a number of errors. If you want to try, I can send you a link to the download.

6 Apr 2013, 11:57 AM
#1256
dh010010 avatar

dh010010

New Zenner

Join Date:
Aug 2012
Posts:
23
Plugin Contributions:
0

Re: SitemapXML v.2

Hi Guys,

As a_berezin would not entertain a bug hunt I started one myself and have fixed the problem.

The problem being that if you use ceon uri mappings they were not generated in the sitemap that this module creates.

To correct this you need to edit the following file:

/includes/modules/pages/sitemapxml/sitemapxml_ezpages.php

Delete all of the code and replace with:

<?php
/**
 * Sitemap XML
 *
 * @package Sitemap XML
 * @copyright Copyright 2005-2012 Andrew Berezin eCommerce-Service.com
 * @copyright Copyright 2003-2012 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: sitemapxml_ezpages.php, v 3.2.2 07.05.2012 19:12 AndrewBerezin $
 */

echo '<h3>' . TEXT_HEAD_EZPAGES . '</h3>';
$select = '';
$from = '';
$where = '';
$order_by = '';
if (SITEMAPXML_EZPAGES_ORDERBY != '') {
  $order_by = SITEMAPXML_EZPAGES_ORDERBY;
}

if ($sitemapXML->dbColumnExist(TABLE_EZPAGES, 'status_meta_robots')) {
  $where .= " AND status_meta_robots=1";
} elseif ($sitemapXML->dbColumnExist(TABLE_EZPAGES, 'status_rel_nofollow')) {
  $where .= " AND status_rel_nofollow!=1";
}


if ($sitemapXML->dbTableExist('TABLE_EZPAGES_TEXT')) {
  $from .= " LEFT JOIN " . TABLE_EZPAGES_TEXT . " pt ON (p.pages_id = pt.pages_id)";
  if ($sitemapXML->dbColumnExist(TABLE_EZPAGES_TEXT, 'language_id')) {
    $where .= " AND pt.language_id IN (" . $sitemapXML->getLanguagesIDs() . ") ";
  } elseif ($sitemapXML->dbColumnExist(TABLE_EZPAGES_TEXT, 'languages_id')) {
    $select .= ", pt.languages_id as language_id";
    $where .= " AND pt.languages_id IN (" . $sitemapXML->getLanguagesIDs() . ") ";
  }
}
if ($sitemapXML->dbColumnExist(TABLE_EZPAGES, 'date_added') && $sitemapXML->dbColumnExist(TABLE_EZPAGES, 'last_modified')) {
    $select .= ", GREATEST(IFNULL(p.date_added, '0001-01-01 00:00:00'), IFNULL(p.last_modified, '0001-01-01 00:00:00')) AS last_date";
  if ($order_by != '') {
    $order_by .= ", ";
  }
  $order_by .= "last_date DESC";
  $last_date_sql = "SELECT MAX(GREATEST(IFNULL(p.date_added, '0001-01-01 00:00:00'), IFNULL(p.last_modified, '0001-01-01 00:00:00'))) AS last_date
                             FROM " . TABLE_EZPAGES . " p " . $from . "
                             WHERE alt_url_external = ''" . $where;
  $last_date = $db->Execute($last_date_sql);
  $table_status = $db->Execute("SHOW TABLE STATUS LIKE '" . TABLE_EZPAGES . "'");
  $last_date = max($table_status->fields['Update_time'], $last_date->fields['last_date']);
  if ($last_date <= '0001-01-01 00:00:00') {
    $last_date = 0;
  }
} else {
  $last_date = 0;
}
if ($sitemapXML->SitemapOpen('ezpages', $last_date)) {
  $page_query_sql = "SELECT p.toc_chapter
                     FROM " . TABLE_EZPAGES . " p " . $from . "
                     WHERE alt_url_external = ''
                       AND (   (status_header = 1 AND header_sort_order > 0)
                            OR (status_sidebox = 1 AND sidebox_sort_order > 0)
                            OR (status_footer = 1 AND footer_sort_order > 0)
                            )
                       AND status_toc != 0" . $where . "
                     GROUP BY toc_chapter";
  $page_query = $db->Execute($page_query_sql); // pages_id
  $toc_chapter_array = array();
  while (!$page_query->EOF) {
    $toc_chapter_array[$page_query->fields['toc_chapter']] = $page_query->fields['toc_chapter'];
    $page_query->MoveNext();
  }
  if (sizeof($toc_chapter_array) > 0) {
    $where_toc = " OR toc_chapter IN (" . implode(',', $toc_chapter_array) . ")";
  } else {
    $where_toc = '';
  }
  $page_query_sql = "SELECT *" . $select . "
                     FROM " . TABLE_EZPAGES . " p " . $from . "
                     WHERE alt_url_external = ''
                       AND (   (status_header = 1 AND header_sort_order > 0)
                            OR (status_sidebox = 1 AND sidebox_sort_order > 0)
                            OR (status_footer = 1 AND footer_sort_order > 0)
                            " . $where_toc . "
                            )" . $where .
                     ($order_by != '' ? " ORDER BY " . $order_by : '');
  $page_query = $db->Execute($page_query_sql); // pages_id
  $sitemapXML->SitemapSetMaxItems($page_query->RecordCount());
  while (!$page_query->EOF) {
    if ($page_query->fields['alt_url'] != '') { // internal link
      $link = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
              $page_query->fields['alt_url'] :
              zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), false, true, true);
      $link = str_replace('&', '&', $link);
      $link = preg_replace('/&&+/', '&', $link);
      $link = preg_replace('/&/', '&', $link);
      $linkParm = '';
      $parse_url = parse_url($link);
      if (!isset($parse_url['path'])) $parse_url['path'] = '/';
      $link_base_url = $parse_url['scheme'] . '://' . $parse_url['host'];
      if ($link_base_url != HTTP_SERVER && $link_base_url != HTTPS_SERVER) {
        echo sprintf(TEXT_ERRROR_EZPAGES_OUTOFBASE, $page_query->fields['alt_url'], $link) . '<br />';
        $link = false;
      } else {
        if (basename($parse_url['path']) == 'index.php') {
          $query_string = explode('&', $parse_url['query']);
          foreach($query_string as $query) {
            list($parm_name, $parm_value) = explode('=', $query);
            if ($parm_name == 'main_page') {
              if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($parm_value, explode(',', constant('ROBOTS_PAGES_TO_SKIP'))) || $parm_value == 'down_for_maintenance') {
                echo sprintf(TEXT_ERRROR_EZPAGES_ROBOTS, $page_query->fields['alt_url'], $link) . '<br />';
                $link = false;
                break;
              }
            }
          }
        }
      }
    } else { // use EZPage ID to create link
      $link = zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'));
      $linkParm = 'id=' . $page_query->fields['pages_id'] . ((int)$page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : '');
    }
    if ($link != false) {
      if (isset($page_query->fields['last_date']) && $page_query->fields['last_date'] != null) {
        if (zen_not_null($page_query->fields['last_date']) && $page_query->fields['last_date'] > '0001-01-01 00:00:00') {
          $last_date = $page_query->fields['last_date'];
        } else {
          $last_date = '';
        }
      } else {
        $last_date = '';
      }
      $page_query->fields['language_id'] = (isset($page_query->fields['language_id']) ? $page_query->fields['language_id'] : 0);
      $sitemapXML->writeItem($link, $linkParm, $page_query->fields['language_id'], $last_date, SITEMAPXML_EZPAGES_CHANGEFREQ);
    }


    $page_query->MoveNext();
  }
  $sitemapXML->SitemapClose();
}
unset($page_query);

// EOF

Now when you force a rebuild of your site maps it will use the ceon uri mappings for your ezpages rather than the standard zen cart query string.

Here is the small section of code that has been changed - just for reference:

Original: (line 115)

$link = FILENAME_EZPAGES;

Changed to:

$link = zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'));

Hope this helps someone :P

6 Apr 2013, 2:39 PM
#1257
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: SitemapXML v.2

DH010010:

I have a small problem with url's that are generated in the sitemap for ezpages. I use ceon uri mapping this replaces the query sting to something more memorable/ pleasing. These cleansed links are displayed in the categories and products sitemaps but not in the ezpage one. Any idea how to rectify this?

Here is the sitemap index file for reference.

Thanks in advance for any help :o)

Edit: We are using zencart 1.5.1 and the latest sitemapxml release

a_berezin:

Hi,

I fully agree with Conor:

I have already said that I do not use and do not intend to use the module CEON URI Mapping, so I can't quickly check. On a more serious research I have neither the time, nor the desire.

If the error is manifest in a different situation, of course, I will search for bug and fix it.

By the way, it is likely that in the latest version 3.2.9 this bug has already does not manifest itself, because in the latest version were corrected a number of errors. If you want to try, I can send you a link to the download.Since the question about EZ Pages URLs not using the URIs created when folks have installed the Ceon URI Mappings module and this module has been asked about frequently on the Ceon URI support thread going back at least a year, I thought that it was about time that someone cross posted the author's response here..

Andrew I posted the references from Conor in this support thread not because I thought you would address the issue.. (I kinda suspected that you would respond as you did) I wanted to provide folks a HINT on where the issue lie in case someone with the skillset and the inclination to do so could address the issue and so that folks who use BOTH modules knew that the answer lay somewhere in the XML Sitemap code.

It appears that my HINT helped and DH010010 not only found a solution he shared it with the community.. AND he was kind enough to cross post the solution on the CEON URI thread as well.. Whether you decide to (or have already done so) incorporate those changes (or similar changes) into the add-on is fully up to you. I'm just happy that NOW there is a posted solution for those affected by the issue.

6 Apr 2013, 4:32 PM
#1258
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Mike':

Is it required in the root dir for search engines to function ? Can we place it in the sitemap folder and get the seo desired results ?
I want to clarify - Sitemap file location.

15 Apr 2013, 5:32 AM
#1259
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: SitemapXML v.2

  1. Is there a way to eliminate the generation of **sitemap/sitemapezpages.xml ** and **sitemap/sitemapreviews.xml **? As some people do not want them to get them submitted!

  2. Which .xml file would you use, if you are submitting your site's xml, to other search engines through other means other that zen-cart?

  3. Can sitemap/sitemapcategories.xml and or sitemap/sitemapproducts.xml be submitted individually and not together?

15 Apr 2013, 5:44 AM
#1260
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: SitemapXML v.2

Is there a way to limit the number of products being indexed?

Is there a limit to the number of products a search engines accept? Before they kick you.