Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

Hi, I have an error (mysql warning) on the article_info.php page. (and also article_reviews_write.php)

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/pollux/WWW/horsewellness/includes/functions/database.php on line 103

 

Anyone who knows how to fix this?

 

the code from database.php around line 103 is:

function tep_db_num_rows($db_query) {

return mysql_num_rows($db_query);

}

Link to comment
Share on other sites

There's not any code to check the database in the articles_info file. It does call in the code for xsell though and that does check it so that might be the cause of the failure, though I don't know why. Try this. Open articles_info.php and locate this code near the bottom

   if ( (USE_CACHE == 'true') && !SID) {
    include(DIR_WS_MODULES . FILENAME_ARTICLES_XSELL);
  } else {
    include(DIR_WS_MODULES . FILENAME_ARTICLES_XSELL);
   }

and change it to

   if ( (USE_CACHE == 'true') && !SID) {
//     include(DIR_WS_MODULES . FILENAME_ARTICLES_XSELL);
  } else {
//     include(DIR_WS_MODULES . FILENAME_ARTICLES_XSELL);
   }

That will just hide the problem if that is the cause, but it will isolate it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It still returns the same error, pretty weird...

 

I've searched all the files for the mysql_num_rows function. The xsell file is the only place where it's used. So your 'fix' should at least hide the problem, like you said.

 

probably some other place where tep_db_num_rows is used creates the error?

 

maybe Line 256: in admin\includes\functions\articles.php "if (tep_db_num_rows($childs_query)) { " ??

Link to comment
Share on other sites

No, the code in admin won't affect the shop side. My guess is that it is the Header Tags code in application_top. If you haven't setup Header Tags correctly, you may get an error like this. Be sure to go into page control for articles and add title and meta tag information.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

My RSS feed is also empty but I have tryed the same without luck.

 

The SQL "$news_query_raw" from article_rss.php is working, but there are no output in firefox.

 

Any help?

I'm the owner of a danish gift shop, where you will find gifts, ideas & presents for her & him.

Link to comment
Share on other sites

No, the code in admin won't affect the shop side. My guess is that it is the Header Tags code in application_top. If you haven't setup Header Tags correctly, you may get an error like this. Be sure to go into page control for articles and add title and meta tag information.

 

Found the problem. This contribution user a header tags table, which i do not have in my database. So therefor i commented a few lines in the application_top.php. It fixed it by commenting the whole function. I will use the KISS header tag contri that FWRmedia is currently working on, he will add support for a number of contrinutions, including article manager... :)

Link to comment
Share on other sites

Found the problem. This contribution user a header tags table, which i do not have in my database. So therefor i commented a few lines in the application_top.php. It fixed it by commenting the whole function. I will use the KISS header tag contri that FWRmedia is currently working on, he will add support for a number of contrinutions, including article manager... :)

Then you have the wrong version of Articles Manager installed. The version that references Header Tags SEO has been edited and is missing code you will need if not using Header Tags SEO. So you will probably have to reinstall the other version.

 

I'm curious why you would use a meta tag contribution other than Header Tags SEO though. I think the usual response is because the others are easier to install but that easiness comes at a high price. It makes no difference to me, of course, but I sure hate to see a shop owner damage his site for the sake of saving a little time with installation.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

To just insert an image, use regular html code in the article

<img src="images/some_image.jpg" alt="some text" width="xx" hiehgt="yy" border="0">

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I encountered the same problem, check the forum, found nothing, so decided to take look at the codes... I've added a few things to articles_xsell.php and it seems to work for me now.

 

1. add the following line to articles_xsell.php ~line 21 just below require('includes/application_top.php');

 

$add_related_article_ID = (isset($HTTP_GET_VARS['add_related_article_ID']) ? $HTTP_GET_VARS['add_related_article_ID'] : '');

 

2. search for '$query = "INSERT INTO "' in articles_xsell.php ~line 156 and replace that line with

 

$query = "INSERT INTO " . TABLE_ARTICLES_XSELL . " (articles_id, xsell_id, sort_order) VALUES ($_POST[add_related_article_ID],$temp,1)";

 

Alright, hope this helps. It's a 10 minites check and change for me so I've not do any real tests. Just thought that some of you might want to know about it.

 

I have just installed Articles Manager V 1.57_3 and articles_xell.php don't work fine, adding this code I can add products to articles.

 

Would be good to have in mind for future versions.

 

Thanks to elfstone for this fix

and

Thanks to all the people who made this contribution

 

Sorry for my poor english.

 

Regards!!!

Link to comment
Share on other sites

Yes, I do and they work fine together in RC2.

 

I've installed it too, but have a problem..

In articles info page I only see title and keywords metatag with the value of "Article Info ". The description metatag is empty.

And I want to see an article name or description in metatags. Need help!

Sorry for my english...

Link to comment
Share on other sites

Yes, I do and they work fine together in RC2.

 

I've installed it too, but have a problem..

In articles info page I only see title and keywords metatag with the value of "Article Info ". The description metatag is empty.

And I want to see an article name or description in metatags. Need help!

Sorry for my english...

Link to comment
Share on other sites

I've installed it too, but have a problem..

In articles info page I only see title and keywords metatag with the value of "Article Info ". The description metatag is empty.

And I want to see an article name or description in metatags. Need help!

I don't know what the original problem was but if you aren't seeing specific titles or tags for an article, you probably need to add them as pseudo pages in Header Tags.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I don't know what the original problem was but if you aren't seeing specific titles or tags for an article, you probably need to add them as pseudo pages in Header Tags.

Mmm.. I don't understand you. What is pseudo page? Can you give fully instructions or screenshots how to do it, please?

 

 

scr.jpg

 

I checked Category and Product. I thought Category equals topic name and Product equals article name, does it?

And I see only "test" in title.. (

Sorry for my english...

Link to comment
Share on other sites

Thank you, Jack_mcs! I've found what a pseudo page is! )) Now it works!

 

I've added article_info.php?articles_id=2 page. But my article's url is article-name-a-2.html, so i need to know id's of each articles - it is uncomfortably..

 

When I try to add article-name-a-2.html page I have error

Entered pseudo page format, prodazha-plitki-a-2.html, is incorrect.

Sorry for my english...

Link to comment
Share on other sites

  • 2 weeks later...

can someone please let me know how i can add image in the abstract article listing.

 

thanks

<img src="images/some_image.jpg" alt="some text">

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.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

i have another question, in the articles info page, there's a sentence that says "For more information about this article, please visit this web page." But if you click the link, I am getting redirected in my index page and not in the url of the article. How can i fix this one so that it will redirect to the article url?

 

thanks

Link to comment
Share on other sites

There is a url setting in the article edit page in admin. You have to enter the url as indicated. I tried it here and it works as expected.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I found this issue here posted somewhere in the forum

I'm setting up a store under WAMP before going live and have been adding articles using the Article Manager 1.2b. Great add-on by the way. Anyways, I then added a new language and noticed that all the articles and topics that I had added previously do not show up under the new language.

In Admin I can go to those articles and edit them and when I do that it shows an extra place to put the article in the new language. It previews OK, but then when I click update, it doesn't add anything. I can go right back into Edit and everything I just wrote for the new language is gone.

Everything works good if I add more articles. All new articles will show up in the new language. It's just that everything that was done prior to installing a new language doesn't show up in the new language and I can't see anyway to add them.

Anyone have any idea about this?

Thanks.

BK

 

I had the same (similar) issue: When adding a new language, after article manager was installed, the existing topics and articles were not showing up in the new language, and did not got "prefilled" with the content of the old language like it is done for categoties and products. This was causing also various errors, I don't remember them anymore.

 

Anyway, what I did is following: In file admin/languages.php after

// create additional manufacturers_info records
       $manufacturers_query = tep_db_query("select m.manufacturers_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '" . (int)$languages_id . "'");
       while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
         tep_db_query("insert into " . TABLE_MANUFACTURERS_INFO . " (manufacturers_id, languages_id, manufacturers_url) values ('" . $manufacturers['manufacturers_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($manufacturers['manufacturers_url']) . "')");
       }

I added

// BOF multimixer 5 1 2010 article manager adition
// create additional topics_description records
       $topics_query = tep_db_query("select t.topics_id, td.topics_name from " . TABLE_TOPICS . " t left join " . TABLE_TOPICS_DESCRIPTION . " td on t.topics_id = td.topics_id where td.language_id = '" . (int)$languages_id . "'");
       while ($topics = tep_db_fetch_array($topics_query)) {
         tep_db_query("insert into " . TABLE_TOPICS_DESCRIPTION . " (topics_id, language_id, topics_name) values ('" . (int)$topics['topics_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($topics['topics_name']) . "')");
       }

// create additional articles_description records
       $articles_query = tep_db_query("select a.articles_id, ad.articles_name, ad.articles_description, ad.articles_url from " . TABLE_ARTICLES . " a left join " . TABLE_ARTICLES_DESCRIPTION . " ad on a.articles_id = ad.articles_id where ad.language_id = '" . (int)$languages_id . "'");
       while ($articles = tep_db_fetch_array($articles_query)) {
         tep_db_query("insert into " . TABLE_ARTICLES_DESCRIPTION . " (articles_id, language_id, articles_name, articles_description, articles_url) values ('" . (int)$articles['articles_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($articles['articles_name']) . "', '" . tep_db_input($articles['articles_description']) . "', '" . tep_db_input($articles['articles_url']) . "')");
       }

// create additional authors_info records
       $authors_query = tep_db_query("select au.authors_id, ai.authors_url from " . TABLE_AUTHORS . " au left join " . TABLE_AUTHORS_INFO . " ai on au.authors_id = ai.authors_id where ai.languages_id = '" . (int)$languages_id . "'");
       while ($authors = tep_db_fetch_array($authors_query)) {
         tep_db_query("insert into " . TABLE_AUTHORS_INFO . " (authors_id, languages_id, authors_url) values ('" . $authors['authors_id'] . "', '" . (int)$insert_id . "', '" . tep_db_input($authors['authors_url']) . "')");
       }
// EOF multimixer 5 1 2010 article manager adition

This works fine for me, well, I don't know if anybody else faced this problem

Link to comment
Share on other sites

Thank you George!!

 

I had to delete the language in admin and then reinstall it but it did the trick!

 

--BK

 

Of course you had to reinstall the language, this code is getting "activated" in the moment of a new language installation, nothing to do with old languages. It looks like osCmax also didn't had a solution for this

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