Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi!

 

I've got an error message in the admin part after click on the catalog/categories&products:

 

WYSIWYG_HTMLArea_error.jpg

 

Mind having a look at it?

 

Thx, Andrew

Posted

I'm getting the exact same error, man! :o

 

If you figure out the problem, would you please post the solution?

  • 5 months later...
Posted

Guys,

 

The installation instructions are slightly off they currently say:

 

STEP 1.1g --> FIND: /admin/categories.php
 ===========================================================================
=========
 Look/search for this around line 1051:
 ===========================================================================
=========


       } else { // create category/product info
         $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

         $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
       }
       break;
   }

   if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
     echo '            <td width="25%" valign="top">' . "\n";

     $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";
   }
?>


 ===========================================================================
=========
 And directly UNDERNEATH IT add this:
 ===========================================================================
=========



       } else { // create category/product info
         $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

         $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
       }
       break;
   }

   if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
     echo '            <td width="25%" valign="top">' . "\n";

     $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";

     // Add neccessary JS for WYSIWYG editor of category image
     if($action=='edit_category'){
       if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
         echo '
                 <script language="JavaScript1.2" defer>
                 var config = new Object();  // create new config object
                 config.width  = "250px";
                 config.height = "35px";
                 config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
                 config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
                 config.toolbar = [ ["InsertImageURL"] ];
                 config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
                 editor_generate("categories_image",config);
                </script>
              ';
       }
     }

   }

 

But it should say:

 

STEP 1.1g --> FIND: /admin/categories.php
 ===========================================================================
=========
 Look/search for this around line 1051:
 ===========================================================================
=========


       } else { // create category/product info
         $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

         $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
       }
       break;
   }

   if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
     echo '            <td width="25%" valign="top">' . "\n";

     $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";
   }
?>


 ===========================================================================
=========
 And REPLACE it with:
 ===========================================================================
=========



       } else { // create category/product info
         $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

         $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
       }
       break;
   }

   if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
     echo '            <td width="25%" valign="top">' . "\n";

     $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";

     // Add neccessary JS for WYSIWYG editor of category image
     if($action=='edit_category'){
       if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
         echo '
                 <script language="JavaScript1.2" defer>
                 var config = new Object();  // create new config object
                 config.width  = "250px";
                 config.height = "35px";
                 config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
                 config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
                 config.toolbar = [ ["InsertImageURL"] ];
                 config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
                 editor_generate("categories_image",config);
                </script>
              ';
       }
     }

   }
?>

 

Note the corrected position of the final ?> and the instruction to REPLACE rather than add...

 

Hope that helps.

 

-Christian

Posted
Guys,

 

The installation instructions are slightly off they currently say:

 

STEP 1.1g --> FIND: /admin/categories.php
?===============================================================================
=====
?Look/search for this around line 1051:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";
? ?}
?>
?===============================================================================
=====
?And directly UNDERNEATH IT add this:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";

? ? ?// Add neccessary JS for WYSIWYG editor of category image
? ? ?if($action=='edit_category'){
? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
? ? ? ? ?echo '
? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer>
? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object
? ? ? ? ? ? ? ? ?config.width ?= "250px";
? ? ? ? ? ? ? ? ?config.height = "35px";
? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ];
? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
? ? ? ? ? ? ? ? ?editor_generate("categories_image",config);
? ? ? ? ? ? ? ? </script>
? ? ? ? ? ? ? ';
? ? ? ?}
? ? ?}

? ?}

 

But it should say:

 

STEP 1.1g --> FIND: /admin/categories.php
?===============================================================================
=====
?Look/search for this around line 1051:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";
? ?}
?>
?===============================================================================
=====
?And REPLACE it with:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";

? ? ?// Add neccessary JS for WYSIWYG editor of category image
? ? ?if($action=='edit_category'){
? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
? ? ? ? ?echo '
? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer>
? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object
? ? ? ? ? ? ? ? ?config.width ?= "250px";
? ? ? ? ? ? ? ? ?config.height = "35px";
? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ];
? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
? ? ? ? ? ? ? ? ?editor_generate("categories_image",config);
? ? ? ? ? ? ? ? </script>
? ? ? ? ? ? ? ';
? ? ? ?}
? ? ?}

? ?}
?>

 

Note the corrected position of the final ?> and the instruction to REPLACE rather than add...

 

Hope that helps.

 

-Christian

 

Hi,

I am having the same problem. i did what you recomended, but i get this error.

 

Parse error: parse error, unexpected T_ELSE in /hsphere/local/home/ricky33/gamesrealcheap.com/admin/categories.php on line 1157

 

Do you know what this means?

Thanks

Posted
Guys,

 

The installation instructions are slightly off they currently say:

 

STEP 1.1g --> FIND: /admin/categories.php
?===============================================================================
=====
?Look/search for this around line 1051:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";
? ?}
?>
?===============================================================================
=====
?And directly UNDERNEATH IT add this:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";

? ? ?// Add neccessary JS for WYSIWYG editor of category image
? ? ?if($action=='edit_category'){
? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
? ? ? ? ?echo '
? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer>
? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object
? ? ? ? ? ? ? ? ?config.width ?= "250px";
? ? ? ? ? ? ? ? ?config.height = "35px";
? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ];
? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
? ? ? ? ? ? ? ? ?editor_generate("categories_image",config);
? ? ? ? ? ? ? ? </script>
? ? ? ? ? ? ? ';
? ? ? ?}
? ? ?}

? ?}

 

But it should say:

 

STEP 1.1g --> FIND: /admin/categories.php
?===============================================================================
=====
?Look/search for this around line 1051:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";
? ?}
?>
?===============================================================================
=====
?And REPLACE it with:
?===============================================================================
=====
? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";

? ? ?// Add neccessary JS for WYSIWYG editor of category image
? ? ?if($action=='edit_category'){
? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
? ? ? ? ?echo '
? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer>
? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object
? ? ? ? ? ? ? ? ?config.width ?= "250px";
? ? ? ? ? ? ? ? ?config.height = "35px";
? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ];
? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
? ? ? ? ? ? ? ? ?editor_generate("categories_image",config);
? ? ? ? ? ? ? ? </script>
? ? ? ? ? ? ? ';
? ? ? ?}
? ? ?}

? ?}
?>

 

Note the corrected position of the final ?> and the instruction to REPLACE rather than add...

 

Hope that helps.

 

-Christian

 

Can you post a copy of your Categories.php so that i can compare yours to mine?

i tried your suggestions but i can't get rid of the garbage.

Posted

The categories.php file is way too big to post here, so here is the chunk from lines ~1062-1090:

 

      $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";

     // Add neccessary JS for WYSIWYG editor of category image
     if($action=='edit_category'){
       if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
         echo '
                 <script language="JavaScript1.2" defer>
                 var config = new Object();  // create new config object
                 config.width  = "250px";
                 config.height = "35px";
                 config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
                 config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
                 config.toolbar = [ ["InsertImageURL"] ];
                 config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
                 editor_generate("categories_image",config);
                </script>
              ';
       }        
     }

   }
?>
         </tr>
       </table></td>
     </tr>
   </table>

 

You should easily be able to find the $box line...then just replace as above. Don't forget to keep the important stuff either side of this chunk :thumbsup:

 

-Christian

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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