Jump to content
Jack_mcs

Sitemap SEO

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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

The functions get called by the main code so look there for that function name.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thank you for mentioning that mistake. I will change it in the next release.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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');

Share this post


Link to post
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.

Share this post


Link to post
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 (

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Hi,

 

I just installed the contrib, but get only categories, products and Articles displayed on sitemap.php.

 

It this normal? In page control I have no other pages excluded...

 

Thanks!

Lars

Share this post


Link to post
Share on other sites

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

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

×