Jump to content
Jack_mcs

Sitemap SEO

Recommended Posts

Just now, Jack_mcs said:

That error, in a case like this, usually means something is missing or there is a mistake in the file. But what I uploaded is working here so it would seem to be a problem on your side. If you didn't replace all of the files, you will need to do that. Also, see if there is an error_log file since that might explain the failure.

Thanks Jack. Odd enough, I replaced all the files as well as tried to pay attention not to miss some essential files...no way. Will try again in the future, perhaps I am too tired now...

Share this post


Link to post
Share on other sites
On 11/23/2020 at 7:49 PM, Jack_mcs said:

That error, in a case like this, usually means something is missing or there is a mistake in the file. But what I uploaded is working here so it would seem to be a problem on your side. If you didn't replace all of the files, you will need to do that. Also, see if there is an error_log file since that might explain the failure.

Hi Jack, Thanks so much for the update.

 

I can confirm a problem on a vanilla install on Phoenix 1.0.7.10 when opening admin/sitemap_seo_box_control.php :

PHP Notice:  Array to string conversion in /xx/xx/xx/xx/admin/includes/functions/sitemap.php on line 136
PHP Notice:  Array to string conversion in /xx/xx/xx/xx/admin/includes/functions/sitemap.php on line 96
PHP Warning:  file(/xx/xx/xx/xx/includes/modules/boxes/Array): failed to open stream: No such file or directory in /xx/xx/xx/xx/admin/includes/functions/sitemap.php on line 199
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /xx/xx/xx/xx/admin/includes/functions/sitemap.php on line 101
PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /xx/xx/xx/xx/admin/includes/functions/sitemap.php on line 101
PHP Notice:  Array to string conversion in /xx/xx/xx/xx/admin/includes/functions/sitemap.php on line 136
PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /xx/xx/xx/xx/admin/includes/functions/sitemap.php:266
Stack trace:
#0 /xx/xx/xx/xx/admin/sitemap_seo_page_control.php(107): GetPagesArray('/xx/xx/x...', 'includes/langua...', Array, Array)
#1 {main}
  thrown in /homepages/xx/xx/xx/admin/includes/functions/sitemap.php on line 266

 

Which on the store side does not show the boxes in the sitemap, only categories and manufacturers. Thank you for your help.
 

Share this post


Link to post
Share on other sites
45 minutes ago, artfulweb said:

Which on the store side does not show the boxes in the sitemap, only categories and manufacturers.

That's correct. The code for handling the infoboxes in Phoenix needs to be replaced but I'm not sure it is worth the effort.  I didn't see all of the warnings you mentioned since they only occur if you try to use the box control section and I didn't do that since I knew it wouldn't work. I'm sorry I forgot to mention it.

 In pre-Phoenix, and maybe pre-Frozen shops, some of the links in the boxes were only shown if the box was showing.  But in Phoenix, most, if not all, of the links will already be displayed in another module, like a footer module. Do you see a need to show the links in the site map? Technically, they do belong in the site map. I'm just wondering if there is any point in doing that?

Share this post


Link to post
Share on other sites
2 minutes ago, Jack_mcs said:

That's correct. The code for handling the infoboxes in Phoenix needs to be replaced but I'm not sure it is worth the effort.  I didn't see all of the warnings you mentioned since they only occur if you try to use the box control section and I didn't do that since I knew it wouldn't work. I'm sorry I forgot to mention it.

 In pre-Phoenix, and maybe pre-Frozen shops, some of the links in the boxes were only shown if the box was showing.  But in Phoenix, most, if not all, of the links will already be displayed in another module, like a footer module. Do you see a need to show the links in the site map? Technically, they do belong in the site map. I'm just wondering if there is any point in doing that?

Honestly I do not know if they are really useful or not, I was just used to them after all these years! Do the bots use the sitemap? Guess that would be the question. At any rate the rest works just fine. Thanks Jack!

Share this post


Link to post
Share on other sites
21 hours ago, artfulweb said:

Do the bots use the sitemap?

Yes, they do. That is really the main reason I wrote it in the first place. But the links on it just provide help for the ranking of the linked to page and is not as important now as it used to be. I may go ahead and add the code whenever I get back to working on this addon but in the meantime not using  the box section is the best choice.

Share this post


Link to post
Share on other sites
1 hour ago, Jack_mcs said:

Yes, they do. That is really the main reason I wrote it in the first place. But the links on it just provide help for the ranking of the linked to page and is not as important now as it used to be. I may go ahead and add the code whenever I get back to working on this addon but in the meantime not using  the box section is the best choice.

Thanks Jack, I know we keep you horribly busy!

Share this post


Link to post
Share on other sites

Hi Jack,

Me again. Upgraded to PHOENIX 1.0.7.14 and have this error:

Uncaught Error: Call to undefined method category_tree::buildBranchArray() in /xx/xxx/xx/xx/sitemap.php:64
Stack trace:
#0 {main}
  thrown in /xx/xx/xx/xx/sitemap.php on line 64

Line 64 is :

  foreach ($osC_CategoryTree->buildBranchArray(0) as $cat) {

 

Any ideas? Thank you in advance.
 

Share this post


Link to post
Share on other sites

@artfulwebThere are a number of changes needed for that version but these will get some of them. In admin/sitemap.php, remove this line

 $class = 'category_tree.php';

and change this line

$osC_CategoryTree = new category_tree()

to

  $osC_CategoryTree = new tree_display(Guarantor::ensure_global('category_tree'));

The last change is also needed in includes/modules/sitemap_categories.php.

Share this post


Link to post
Share on other sites
44 minutes ago, Jack_mcs said:

@artfulwebThere are a number of changes needed for that version but these will get some of them. In admin/sitemap.php, remove this line


 $class = 'category_tree.php';

and change this line


$osC_CategoryTree = new category_tree()

to


  $osC_CategoryTree = new tree_display(Guarantor::ensure_global('category_tree'));

 The last change is also needed in includes/modules/sitemap_categories.php.

Thanks Jack, that works for the sitemap.php file but in the includes/modules/sitemap_categories.php. the line is different :

$osC_CategoryTree = new category_tree($GLOBALS['current_category_id']); 

So not sure how to do it....

Share this post


Link to post
Share on other sites
2 hours ago, artfulweb said:

the includes/modules/sitemap_categories.php. the line is different :

I'm sorry I wasn't clear. Change that line to the same as in the other file.

Share this post


Link to post
Share on other sites

Hi Jack @Jack_mcs, how are you?

my error_log started to fill with the following warning:

PHP Warning:  Use of undefined constant TEXT_MAKE_BOX_SELECTION - assumed 'TEXT_MAKE_BOX_SELECTION' (this will throw an Error in a future version of PHP) in /home/mysite/public_html/catalog/includes/functions/sitemap.php on line 18

sitemap.php line 18 looks like this:

 if ($box != TEXT_MAKE_BOX_SELECTION) {

Any clue how to fix it? 

Best regards.

Valqui


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Share this post


Link to post
Share on other sites

@valquiria23That is most likely due to having enabled an infobox in Box Control.  The code only works for infoboes in shops not using modules for them. Remove those selections and you shouldn't see the warning.

Share this post


Link to post
Share on other sites

Hi Jack @Jack_mcs,

I dont have enabled any infobox in Box Control.  

I think the problem is in Deprecated features in PHP 7.2 +
Unquoted strings:
Unquoted strings that are non-existent global constants are taken to be strings of themselves. This behavior used to emit an E_NOTICE, but will now emit an E_WARNING. In the next major version of PHP, an Error exception will be thrown instead.

any other idea?

best regards

Valqui


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Share this post


Link to post
Share on other sites

Please check admin->Sitemap SEO->Settings Control and make sure there is not an entry in the Standard Boxes box. If it is empty, edit the includes/functions/sitemap.php file and change this line

    if ($box != TEXT_MAKE_BOX_SELECTION) {

to

    define('TEXT_MAKE_BOX_SELECTION', false);
    
    if ($box != TEXT_MAKE_BOX_SELECTION) {

 

Share this post


Link to post
Share on other sites

Hi Jack @Jack_mcs, how are you?

I dont have an entry in the Standard Boxes box, its empty.

Use the fix you propose and it worked correctly.

Is the following line of code the same with respect to the solution that you proposed?

if ($box != (defined('TEXT_MAKE_BOX_SELECTION') && TEXT_MAKE_BOX_SELECTION )) {

best regards

Valqui


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Share this post


Link to post
Share on other sites

@valquiria23The line should be

    if (defined('TEXT_MAKE_BOX_SELECTION') && $box != TEXT_MAKE_BOX_SELECTION) {

But the function that code is in, named GetBoxLinks, is only called from two places. One is in Box Control which, as mentioned, shouldn't be used and the other is in the AddMissingLinks function. But the latest version has that function commented out. So it might be that you are using an older version of this addon since you should not be seeing that notice.

Share this post


Link to post
Share on other sites

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

×