Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sitemap SEO


Jack_mcs

Recommended Posts

Hello

 

Just installed this nice contribution on my fresh 2.3.3 (localhost yet) and got exectly the same error on clicking any Boxes Group Control update button

 

 

Following notice was still left:

Warning: file(/.../.../public_html/includes/modules/boxes/Array) [function.file]: failed to open stream: No such file or directory in/.../.../public_html/admin/includes/functions/sitemap.php on line 203.

What is wrong? How to fix this?

 

I have a version 2.3.3.

 

The fix suggested early dont help

 

admin/sitemap_seo_box_control.php on line 162:

 

if (! is_array($activeBox))

$boxName = explode(".", implode($activeBox));

 

Also It looks strange but I have no standard pages (privacy.php and so on) and no infoboxes displayed on catalog/sitemap.php

Only I see is catalog tree there

On admin side Page control has for example privacy.php unclicked. Also can see all bm_infoboxes in Box control page list

 

Any advice to sort both probs?

 

UPD. Sorted prob with standard pages. Fit any text in Settings control - Heading Text - Standard Pages and pages appears on sitemap. This method dont work for stadard infoboxes

Edited by leveera
Link to comment
Share on other sites

For the error, it appears something is not setup correctly in your configure file since the code is referencing a path above the public_html directory which should not happen. You can check your configure file here. For the other problem, that happens when the installation steps are not completed. Try adding text in the settings control section and see if that helps.

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,

 

Thanks for quick reply.

 

I'm no a guru in php but I beleive I found a clue why standard boxes are not on display

 

catalog/includes/modules/sitemap.php

$boxes_query do TABLE_SITEMAP_SEO_BOXES . " b left join " . TABLE_SITEMAP_SEO_BOX_LINKS

 

but with install I got sitemap_seo_box_links table empty so this query returns 0

 

When I inserted record into sitemap_seo_box_links table by Boxes Individual Control (screen2) - box information appeared on sitemap page (screen3)

 

Meanwhile names of boxes not looks correct yet

 

About error admin/includes/functions/sitemap.php on line 203.

- cant see any problem with path in config as admin-modules-boxes side working fine with all boxes

post-150149-0-37385600-1375558888_thumb.jpg

post-150149-0-69360700-1375558895_thumb.jpg

Link to comment
Share on other sites

It sounds like you didn't initialize the boxes as explained in the instructions.

 

Ooops, that is right idea. Yes I missed the first thing to do note to select and update all boxes by Boxes Individual Control.

That is sorted now. Thanks again!

 

Back to error.... includes/modules/boxes/Array) [function.file]: failed to open stream: No such file or directory in ....admin/includes/functions/sitemap.php on line 203

 

I'm investingting it and found what error gone if I place direct link to file on line 203

 

function GetFilesArray($path, &$lines) {
$lines = '../.../.../.../includes/modules/boxes/bm_information.php';
return true;
}

 

So I suggest what in $lines = file($path); - variable $path is not receiving file name

 

Where the $path is conctructing?

Edited by leveera
Link to comment
Share on other sites

'ok thanks, I beleive it is here

 

catalog/includes/functions/sitemap.php

 

/*****************************************************************
Find all of the links for this infobox
*****************************************************************/ 
function GetBoxLinks($box, $languages) {
   $boxLinks = array();
   if ($box != TEXT_MAKE_BOX_SELECTION) {
    $end =  (substr(DIR_FS_CATALOG, -1) !== '/') ? '/' : '';
    $path = DIR_FS_CATALOG . $end . DIR_WS_MODULES . 'boxes/' . $box;

    $lines = array();

 

again no error on change to $path = DIR_FS_CATALOG . $end . DIR_WS_MODULES . 'boxes/' . 'bm_information.php';

 

at this point i'm stopped as cant find how it receiveing $box

Link to comment
Share on other sites

Thanks it is here

 

 /********************** UPDATE THE BOX SECTION **********************/
 if (isset($_POST['boxfiles']) && $_POST['boxfiles'] !== TEXT_MAKE_BOX_SELECTION ||
  isset($_POST['boxfiles_additional']) && $_POST['boxfiles_additional'] !== TEXT_MAKE_BOX_SELECTION)
 {
 $activeBox = isset($_POST['boxfiles']) ? $_POST['boxfiles']: $_POST['boxfiles_additional'];
 $boxArray['box_file_name'] = $activeBox;
 $boxName = explode(".", $activeBox);
 for ($i = 0; $i < count($languages); ++$i)
 {
   $boxes_query = tep_db_query("select box_page_name, pseudo_page_name, excluded_box from " . TABLE_SITEMAP_SEO_BOXES . " where box_file_name LIKE '" . $boxArray['box_file_name'] . "' and language_id = '" . (int)$languages[$i]['id'] . "'");
   $boxes = tep_db_fetch_array($boxes_query);
   $name = sprintf("box_page_name_%d", $languages[$i]['id']);
   $excludedBox = $boxes['excluded_box'] ? 'checked' : '';
   $activeSection = (isset($_POST['boxfiles']) ? 'files' : 'additional');
   $boxArray[$name] = tep_not_null($boxes['pseudo_page_name']) ? $boxes['pseudo_page_name'] : (tep_not_null($boxes['box_page_name']) ? $boxes['box_page_name'] :$boxName[0]);
 }  
 $linkArray = GetBoxLinks($boxArray['box_file_name'], $languages);
 } 

 

Again no error on test $linkArray = GetBoxLinks('bm_information.php', $languages);

 

But seems I'm not too good in php to catch reason of the error,. Can you help?

Link to comment
Share on other sites

The error seems specific to your shop. At least, I cannot duplicate here. I only provide free help for general questions or problems that I can reproduce.

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

  • 5 months later...

Hi, I found some errata information inside file install.txt on section (7)

now correct:

 

7) In includes/modules/boxes/bm_information.php, only if the
contact_us line is the last one. Otherwise, you have to edit
the code.,
REPLACE:
		 ' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .
WITH:
		 ' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
		 ' <a href="' . tep_href_link(FILENAME_SITEMAP_SEO) . '">' . BOX_INFORMATION_SITEMAP_SEO . '</a>' .

 

before:

 

7) In includes/modules/boxes/bm_information.php, only if the
 contact_us line is the last one. Otherwise, you have to edit
 the code.,

REPLACE:
		  '    <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .

WITH:

		  '    <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
		  '    <a href="' . tep_href_link(FILENAME_SITEMAP_SEO) . '">' . MODULE_BOXES_INFORMATION_SITEMAP_SEO . '</a>' .


Edited by cicciopasticcio
Link to comment
Share on other sites

  • 4 weeks later...

Hi,

Will this contribution work for latest Oscommerce version 2.3.3.4 ?

I started to edit files but when I got to this step I got stuck because i can't find the line mentioned below:

 

4) In admin/includes/column_left.php, before the last ?>,

 

FIND:

 

include(DIR_WS_BOXES . 'tools.php');

 

ADD BENEATH:

 

include(DIR_WS_BOXES . 'sitemap_seo.php');

Link to comment
Share on other sites

@@cicciopasticcio Thanks for posting that. However. using BOX_INFORMATION_SITEMAP_SEO is fine. It is a global define in English.php so it will work.

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

@@artstyle That version of oscommerce doesn't use the column_left.php file as the previous versions did. You can skip that step. As far as I know, the only other issue may be with the database install file. It fails on some 2.3.3.4 shops for some reason. To change it, find all instances of

"INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)  VALUES (NULL,

and replace them with

"INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function)  VALUES (

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,

The database installed without any problem and without any changes needed.

I also found that a step was missing in install instructions. I had to insert in includes/languages/english/modules/boxes/bm_information.php

define('MODULE_BOXES_INFORMATION_SITEMAP_SEO', 'Site Map');

I am not able to use Boxes Group Control feature in /admin/sitemap_seo_box_control.php

 

I get two errors:

 

Warning: explode() expects parameter 2 to be string, array given in C:\wamp\www\catalog2013b\admin\sitemap_seo_box_control.php on line 162

 

Warning: file(C:/wamp/www/catalog2013b/includes/modules/boxes/Array) [function.file]: failed to open stream: No such file or directory in C:\wamp\www\catalog2013b\admin\includes\functions\sitemap.php on line 203

 

I am able to use boxes individual control.

I wasn't able to find where to change the pseudo page name so I changed it from phpmyadmin. Otherwise instead of Boxes

  • All Products

It would display Boxes and in red bm_all_products I

 

Is it possible to change it from the admin panel?

Is there a way to correct the errors? I know it was mentioned before but the fix didn't work for them so I didn't try it.

 

Thanks again for your help.

Edited by artstyle
Link to comment
Share on other sites

I've installed this in all versions of 2.3 shops without any problems so I don't know why it is failing for you. Possibly because you are running it on a local server, though I do that here too.

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

  • 5 months later...

You can't with this addon. This addon creates a site map for the shop. It will be used by the search engines but in a different way. To create google sitemaps, install this 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

  • 3 months later...

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