Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

I couldn't begin to guess without knowing what the error is.

 

On this page

http://127.0.0.1/catalog/admin/articles.php

Located:

Admin>Articles Manager>Topics/Articles

 

I get this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in F:\xampp\htdocs\catalog\admin\includes\functions\articles.php on line 52

 

the entire space for that page reads only the following text

Articles Manager V 1.57_6

(visit the support thread)

by Jack_mcs from oscommerce-solution.com

Check for Updates

Search: [search box also displays]

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in F:\xampp\htdocs\catalog\admin\includes\functions\articles.php on line 52

 

This is the function that the error occurs in

 function tep_get_topic_tree($parent_id = '0', $spacing = '', $exclude = '', $topic_tree_array = '', $include_itself = false) {
   global $languages_id;

   if (!is_array($topic_tree_array)) $topic_tree_array = array();
   if ( (sizeof($topic_tree_array) < 1) && ($exclude != '0') ) $topic_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);

   if ($include_itself) {
     $topic_query = tep_db_query("select cd.topics_name from " . TABLE_TOPICS_DESCRIPTION . " cd where cd.language_id = '" . (int)$languages_id . "' and cd.topics_id = '" . (int)$parent_id . "'");
     $topic = tep_db_fetch_array($topic_query);
     $topic_tree_array[] = array('id' => $parent_id, 'text' => $topic['topics_name']);
   }

   $topics_query = tep_db_query("select c.topics_id, cd.topics_name, c.parent_id from " . TABLE_TOPICS . " c, " . TABLE_TOPICS_DESCRIPTION . " cd where c.topics_id = cd.topics_id and cd.language_id = '" . (int)$languages_id . "' and c.parent_id = '" . (int)$parent_id . "' order by c.sort_order, cd.topics_name");
   while ($topics = tep_db_fetch_array($topics_query)) {
     if ($exclude != $topics['topics_id']) $topic_tree_array[] = array('id' => $topics['topics_id'], 'text' => $spacing . $topics['topics_name']);
     $topic_tree_array = tep_get_topic_tree($topics['topics_id'], $spacing . '   ', $exclude, $topic_tree_array);
   }

   return $topic_tree_array;
 }

 

This specific line of code is where it says the error occurs

 if ($exclude != $topics['topics_id']) $topic_tree_array[] = array('id' => $topics['topics_id'], 'text' => $spacing . $topics['topics_name']); 

 

The other function pages in the admin area display fine

 

This error is occurring in a completely clean/default version of osCommerce 2.3.1 with Header Tags SEO 3.2.5 and Article Manager 1.57_6

 

Is there any more information I can provide you with to assist?

// No comment

# No comment

<!-- No comment -->

/* No comment */

Link to comment
Share on other sites

This error is occurring in a completely clean/default version of osCommerce 2.3.1 with Header Tags SEO 3.2.5 and Article Manager 1.57_6

 

Is there any more information I can provide you with to assist?

No, your explanation was clear though I don't have any ideas on why it is failing. Many other shops use that same code without any problems so I don't see why it fails for you. Although this is the first version of the 2.3 code so there may be something in it that is not quite right. I suggest you install an RC2 shop and try the installs in it. If it works, then it is something related to 2.3. If it fails, then it is something related to your setup. Are you running php 5.3 maybe?

Edited by Jack_mcs

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

No, your explanation was clear though I don't have any ideas on why it is failing. Many other shops use that same code without any problems so I don't see why it fails for you. Although this is the first version of the 2.3 code so there may be something in it that is not quite right. I suggest you install an RC2 shop and try the installs in it. If it works, then it is something related to 2.3. If it fails, then it is something related to your setup. Are you running php 5.3 maybe?

 

My version of XAMPP runs PHP 5.3.1 and MySQL server version 5.1.41

 

However it runs osCommerce 2.3.1 no issue...

 

Does your contribution include deprecated language functions?

// No comment

# No comment

<!-- No comment -->

/* No comment */

Link to comment
Share on other sites

The server I use utilises the following

PHP version 5.2.15

MySQL version 5.1.52

 

Will that fail also?

 

EDIT: Will that fail also if it is just a version incompatibility?

Edited by eXcaliburN

// No comment

# No comment

<!-- No comment -->

/* No comment */

Link to comment
Share on other sites

My version of XAMPP runs PHP 5.3.1 and MySQL server version 5.1.41

 

However it runs osCommerce 2.3.1 no issue...

 

Does your contribution include deprecated language functions?

I'm fairly certain there is code in it that is not 5.3 compatible. It is not my contribution, although I've changed a large part of it, so I am not intimately familiar with all of the code. You can try the following to isolate problems. In the application_top.php file (shop or admin, depending upon where the failure is), find

  error_reporting(E_ALL & ~E_NOTICE);

And replace with

  error_reporting(E_ALL | E_STRICT);

Then refresh the page. There will probably be some minor errors since I haven't had time to fix those. You should look for any deprecated messages.

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

The server I use utilises the following

PHP version 5.2.15

MySQL version 5.1.52

 

Will that fail also?

 

EDIT: Will that fail also if it is just a version incompatibility?

It shouldn't. The code has been installed in many 5.2 shops. But that doesn't mean there isn't some mistake in it or in your installation. But if you contacted me to install it in a 5.2 shop, I wouldn't hesitate since I don't think there will be any problems.

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

I'm fairly certain there is code in it that is not 5.3 compatible. It is not my contribution, although I've changed a large part of it, so I am not intimately familiar with all of the code. You can try the following to isolate problems. In the application_top.php file (shop or admin, depending upon where the failure is), find

  error_reporting(E_ALL & ~E_NOTICE);

And replace with

  error_reporting(E_ALL | E_STRICT);

Then refresh the page. There will probably be some minor errors since I haven't had time to fix those. You should look for any deprecated messages.

Nothing broke, except for the same error I listed above.

 

It shouldn't. The code has been installed in many 5.2 shops. But that doesn't mean there isn't some mistake in it or in your installation. But if you contacted me to install it in a 5.2 shop, I wouldn't hesitate since I don't think there will be any problems.

I'm on your site at the moment - I have created my own template that alters a few files but leaves everything largely standard!

 

I wrote a procedure for myself to simply implement the design changes myself cause I've had to do that a few times.

 

I've discussed with my client, we're happy to pay you to implement the contribution. Although with the non-standard customisations I've made I wanted to ask you about that before making a payment!

Although only two of my edits reside in the same files as your contribution

/includes/languages/english.php

/includes/template_top.php

 

If you'd like to discuss payment matters in private I can contact you through your site?

// No comment

# No comment

<!-- No comment -->

/* No comment */

Link to comment
Share on other sites

Nothing broke, except for the same error I listed above.

 

 

I'm on your site at the moment - I have created my own template that alters a few files but leaves everything largely standard!

 

I wrote a procedure for myself to simply implement the design changes myself cause I've had to do that a few times.

 

I've discussed with my client, we're happy to pay you to implement the contribution. Although with the non-standard customisations I've made I wanted to ask you about that before making a payment!

Although only two of my edits reside in the same files as your contribution

/includes/languages/english.php

/includes/template_top.php

 

If you'd like to discuss payment matters in private I can contact you through your site?

Please contact me privately since discussing such things are prohibited here.

Edited by Jack_mcs

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; some great new features in the last year.

 

A couple of errata in update_v_1.57_5_to_1.57_6.txt to report.

Symptom of the first was the following error when opening the admin/Article Manager menu (if anyone's searching for a solution):

1054 - Unknown column 'a.articles_is_blog' in 'field list'

 

missing SQL statement in 1):

ALTER TABLE `articles` ADD `articles_is_blog` TINYINT( 1 ) NOT NULL AFTER `articles_status`;

 

missing define in 9) (updates to includes/languages/english.php):

define('BOX_ALL_BLOG_ARTICLES', 'All Blog Articles');

 

Plus, when I was looking in the clean install files for the above define, I noticed that the one specified in the update file isn't in

oscommerce_other/catalog/includes/languages/english.php - specifically

define('BOX_ARTICLES_BLOG_COMMENTS', 'Blog Comments');

 

cheers, John

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Hi Jack; some great new features in the last year.

 

A couple of errata in update_v_1.57_5_to_1.57_6.txt to report.

Symptom of the first was the following error when opening the admin/Article Manager menu (if anyone's searching for a solution):

1054 - Unknown column 'a.articles_is_blog' in 'field list'

 

missing SQL statement in 1):

ALTER TABLE `articles` ADD `articles_is_blog` TINYINT( 1 ) NOT NULL AFTER `articles_status`;

 

missing define in 9) (updates to includes/languages/english.php):

define('BOX_ALL_BLOG_ARTICLES', 'All Blog Articles');

 

Plus, when I was looking in the clean install files for the above define, I noticed that the one specified in the update file isn't in

oscommerce_other/catalog/includes/languages/english.php - specifically

define('BOX_ARTICLES_BLOG_COMMENTS', 'Blog Comments');

 

cheers, John

Thanks for posting them. They have all been mentioned already, as I recall but it doesn't hurt to repost them.

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

another bit of missing SQL:

 

DROP TABLE IF EXISTS articles_blog;

CREATE TABLE articles_blog (

unique_id int(11) NOT NULL auto_increment,

articles_id int(11) NOT NULL default 0,

customers_id int(11) NOT NULL default 0,

commenters_name varchar(54) default NULL,

comment_date_added datetime NOT NULL default '0000-00-00 00:00:00',

comments_status tinyint(1) NOT NULL default '0',

comment text NOT NULL default '',

language_id int(11) NOT NULL default '1',

PRIMARY KEY (unique_id),

KEY idx_articles_id (articles_id)

) TYPE=MyISAM;

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Apologies if this also has been mentioned, though I didn't find it.

(Using the _other versions of 1.57_6)

 

In admin article manager, when you go back in to edit an article with both status and blog status set to green, after updating the blog status goes back to red.

 

Is this by design?

 

cheers, J

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

In admin article manager, when you go back in to edit an article with both status and blog status set to green, after updating the blog status goes back to red.

 

Is this by design?

No, that's a coding mistake. I wasn't aware of it so thanks for mentioning it.

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 again, Jack.

 

I think there's something with the editor code in articles.php for TinyMCE Anywhere:

 

When creating or editing an article it's invoked ok, but in the preview page, below the preview of the article, you get editable fields for all the descriptions, with the content in them too. Further, if you go ahead and save, the fields are all wiped (like, I read somewhere, if you don't use the Anywhere version of TinyMCE), so in my install you can't use this editor.

 

If it's a problem with my TinyMCE installation, it's not exhibited for products, categories etc configured through Header Tags SEO.

 

If others have this problem and an immediate workaround is needed, CKEditor works fine (I didn't try FCKEditor).

 

Incidentally, I think I'll take the editor off the meta description fields; unless you remembered what the reason was for including that option in Header Tags SEO?

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

Hi again, Jack.

 

I think there's something with the editor code in articles.php for TinyMCE Anywhere:

 

When creating or editing an article it's invoked ok, but in the preview page, below the preview of the article, you get editable fields for all the descriptions, with the content in them too. Further, if you go ahead and save, the fields are all wiped (like, I read somewhere, if you don't use the Anywhere version of TinyMCE), so in my install you can't use this editor.

 

If it's a problem with my TinyMCE installation, it's not exhibited for products, categories etc configured through Header Tags SEO.

 

If others have this problem and an immediate workaround is needed, CKEditor works fine (I didn't try FCKEditor).

 

Incidentally, I think I'll take the editor off the meta description fields; unless you remembered what the reason was for including that option in Header Tags SEO?

I'm not aware of that problem. I can't test it right now but will take a look at it for the next version. The option for the meta description has already been removed from the next version of Header Tags. But, to be clear, this refers to the products meta description. The field name meta description in articles is for text on the page so that is still needed.

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

I am getting the following error

 

Date / Time: 13-02-2011 14:43:25

Error Type: [E_NOTICE] A non well formed numeric value encountered

On line 12

File article_rss.php

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

Also when I do a view source the date is shown as follows

 

<pubDate>Sun, 07 Feb 2010 00:00:00 +0000</pubDate>

 

Thanks in advance

Link to comment
Share on other sites

Hi

I am getting the following error

 

Date / Time: 13-02-2011 14:43:25

Error Type: [E_NOTICE] A non well formed numeric value encountered

On line 12

File article_rss.php

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

Also when I do a view source the date is shown as follows

 

<pubDate>Sun, 07 Feb 2010 00:00:00 +0000</pubDate>

 

Thanks in advance

It appears the date is incorrect for that article. You need to determine which it is and checks it date. Maybe just updating it in admin will fix it.

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

It appears the date is incorrect for that article. You need to determine which it is and checks it date. Maybe just updating it in admin will fix it.

 

 

I have produced another article and go these results

 

View source at 8.34 14th feb gives

<item><title>testing</title>

<pubDate>Fri, 04 Feb 2011 08:03:00 +0000</pubDate>

Link to comment
Share on other sites

Hi Jack.

 

I have a new problem, although I have seen it before on this thread the author never mentioned how to fix.

I installed SEO tags, and your article manager correctly.

 

When I open the articles.php in the admin panel I get the following error.

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24625 bytes) in /home/xxx/public_html/dev/xxx/includes/functions/articles.php on line 105

 

The line is.

   $topics_query = tep_db_query("select c.topics_id, cd.topics_name, c.parent_id from " . TABLE_TOPICS . " c, " . TABLE_TOPICS_DESCRIPTION . " cd where c.topics_id = cd.topics_id and cd.language_id = '" . (int)$languages_id . "' and c.parent_id = '" . (int)$parent_id . "' order by c.sort_order, cd.topics_name");
   while ($topics = tep_db_fetch_array($topics_query)) {
     if ($exclude != $topics['topics_id']) $topic_tree_array[] = array('id' => $topics['topics_id'], 'text' => $spacing . $topics['topics_name']);
     [b]$topic_tree_array = tep_get_topic_tree($topics['topics_id'], $spacing . '   ', $exclude, $topic_tree_array);[/b]
   }

 

The bold line is the line in question. When I ran this on my local WAMP server I got a loop error. If this is due to empty tables in the db is there a sample dump I can use?

 

Thanks Ed

Edited by EdwardKnowles
Link to comment
Share on other sites

Hi Jack.

 

I have a new problem, although I have seen it before on this thread the author never mentioned how to fix.

I installed SEO tags, and your article manager correctly.

 

When I open the articles.php in the admin panel I get the following error.

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24625 bytes) in /home/xxx/public_html/dev/xxx/includes/functions/articles.php on line 105

 

The line is.

 

The bold line is the line in question. When I ran this on my local WAMP server I got a loop error. If this is due to empty tables in the db is there a sample dump I can use?

 

Thanks Ed

I can't say why that is failing without working on it but try this change to see if it makes a difference. Before

while ($topics = tep_db_fetch_array($topics_query)) { 

add

if (tep_db_num_rows($topics_query) > 0)

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

I can't say why that is failing without working on it but try this change to see if it makes a difference. Before

while ($topics = tep_db_fetch_array($topics_query)) { 

add

if (tep_db_num_rows($topics_query) > 0)

 

Sorry Jack, that didn't work.

 

On a local WAMP I get the following php error:

Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\OSC\admin\includes\functions\database.php on line 40

 

It's clearly looping something!

Link to comment
Share on other sites

Hey guys, I've installed Header Tags SEO & Article Manager without any problem; on the Admin Panel side, everything is OK... But when I try to view the articles on the site, nothing shows. I guess the culprit is my template... Yes, I've used a template to build my e-commerce and that template has no left or right-column (where the articles should show, shouldn't they?)

So, what could I do to bypass that problem? Is it compulsory for the articles to be either in column left or right? Can't I just specify a URL where the articles could simply appear ?

Btw, I'm on ver 2.3.1... if it makes any difference :)

Link to comment
Share on other sites

Hey guys, I've installed Header Tags SEO & Article Manager without any problem; on the Admin Panel side, everything is OK... But when I try to view the articles on the site, nothing shows. I guess the culprit is my template... Yes, I've used a template to build my e-commerce and that template has no left or right-column (where the articles should show, shouldn't they?)

So, what could I do to bypass that problem? Is it compulsory for the articles to be either in column left or right? Can't I just specify a URL where the articles could simply appear ?

Btw, I'm on ver 2.3.1... if it makes any difference :)

The articles are displayed in an infobox. In 2.3, you have to install the infobox in admin->Modules->Boxes before it will show up. That's assuming you have a column to show it in. Your template may not allow that. In that case, you would have manually add links to the articles somewhere on the page. You'll lose a lot of the options that may but it may be your only choice.

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

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