Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FAQDesk version 1.0 --- Released


moyashi

Recommended Posts

Im getting the following error on a current snapshot in faqdesk_index.php and newsdesk_index.php

 

1064 - You have an error in your SQL syntax near ') as total ' at line 1

 

select count() as total

 

[TEP STOP]

 

as the code is identical there must be some incompatability between the modules and CVS2.2 of MS2

 

ive applied the fixes already mentioned but this is one i cant seemt o solve....

 

can anyone please help?

Link to comment
Share on other sites

  • Replies 132
  • Created
  • Last Reply

Top Posters In This Topic

Im getting the following error on a current snapshot in faqdesk_index.php and newsdesk_index.php

 

1064 - You have an error in your SQL syntax near ') as total ' at line 1

 

select count() as total

 

[TEP STOP]

 

as the code is identical there must be some incompatability between the modules and CVS2.2 of MS2

 

ive applied the fixes already mentioned but this is one i cant seemt o solve....

 

can anyone please help?

 

Below these lines in faqdesk_index.php

 

// IF this area is included problems occur when trying to view unpopulated catagories

// OR!!! is this not a but???

// Well which the @!#p$@ is it?  Regular products shows the catagory while the below won't @!#@&@

 

There are a couple of select count(*) queries. Make sure you have an asterik between the (). Though, by the comments above there may be a known bug in there to be wary of.

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Link to comment
Share on other sites

I am using a snapshot from earlier this week. I get the following error when trying to view an FAQ category.

--------------------------------------------------------------------------

1064 - You have an error in your SQL syntax near 'select pd.faqdesk_answer_long, pd.faqdesk_answer_short, p.faqdesk_id, p.faqdesk' at line 1

 

select count(select pd.faqdesk_answer_long, pd.faqdesk_answer_short, p.faqdesk_id, p.faqdesk_date_added, pd.faqdesk_question, pd.faqdesk_answer_long, pd.faqdesk_answer_short from faqdesk_description pd, faqdesk p, faqdesk_to_categories p2c where p.faqdesk_status = '1' and p.faqdesk_id = p2c.faqdesk_id and pd.faqdesk_id = p2c.faqdesk_id and pd.language_id = '1' and p2c.categories_id = '1' order by pd.faqdesk_question) as total

 

--------------------------------------------------------------------------

I have gone over the code from the original category/products and it succesfully uses the count(*) syntax in the SQL querry. This is very

strange. Any help would be appreciated.

 

thanks

frank

Link to comment
Share on other sites

Hi gpraceman (which is your favourite Grand Prix Team?:-))

 

Thanx a lot for your fix. Its already a few weeks ago that i work with OsCommerce. But now it goes on...

 

-------------------------------------------------------------------------------

"If humans spoke only about things they understand, then it would be very quiet in the world"

Link to comment
Share on other sites

Hi

 

All works great with this fine contribution but i can?t solve a problem with the images 1/2/3. I?m using 2.2MS1. The upload works correct - i can find the images in the right folder and in the database there is also the correct image included.

I can see the image in the admin area, but NOT in the catalog area (frontpage settings, all images enabled).

 

I viewed all postings, but i can?t find the right answer, solving this problem.

 

Has anyone an idea?

 

greetings

Rainer

Link to comment
Share on other sites

Hi

 

All works great with this fine contribution but i can?t solve a problem with the images 1/2/3. I?m using 2.2MS1. The upload works correct - i can find the images in the right folder and in the database there is also the correct image included.

I can see the image in the admin area, but NOT in the catalog area (frontpage settings, all images enabled).

 

I viewed all postings, but i can?t find the right answer, solving this problem.

 

Has anyone an idea?

 

greetings

Rainer

 

This is what I did to get it working. Find this code in faqdesk_index.php (it will appear twice)

 

if (($categories['categories_image'] = 'NULL') or ($categories['categories_image'] = '')) {

echo tep_draw_separator('pixel_trans.gif', '1', '1');

} else {

echo tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);

}

 

And replace it with this

 

// BOF: Modified to fix image display problem

//if (($category['categories_image'] = 'NULL') or ($category['categories_image'] = '')) {

if (!tep_not_null($category['categories_image'])) {

// EOF: Modified to fix image display problem

echo tep_draw_separator('pixel_trans.gif', '1', '1');

} else {

echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);

}

 

I did some other monkeying with that page, but I think this is all you need for the image display issue.

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Link to comment
Share on other sites

Thanks a lot for your effort. I tried it out, but it doesn?t work.

The prob is not the categories-image, it is a prob with the faqdesk_image, they are not visible in the catalog area.

 

Has anyone else an idea?

 

greetings

Rainer

Link to comment
Share on other sites

Hello,

 

i solved the problem. It think it was not a real problem. :oops: I didn?t know that the faqdesk_image only is shown in the sticky-mode.

 

But it would be nice, if the image is also shown in the detailed FAQ.

 

greetings

Rainer

Link to comment
Share on other sites

See my earlier question:

 

in file catalog/includes/modules/faqdesk/faqdesk_listing.php

 

on or about line 17 fine the line

 

$listing_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_FAQDESK_SEARCH_RESULTS, $listing_sql, $listing_numrows);

 

and change it to:

 

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_FAQDESK_SEARCH_RESULTS, '*', $HTTP_GET_VARS['page']);

 

after making this change, I got everything to work just great.

 

I have only tried this on a most recent snapshot.

 

frankj :D

Link to comment
Share on other sites

See my earlier question:

 

in file catalog/includes/modules/faqdesk/faqdesk_listing.php

 

on or about line 17 fine the line

 

$listing_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_FAQDESK_SEARCH_RESULTS, $listing_sql, $listing_numrows);

 

and change it to:

 

$listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_FAQDESK_SEARCH_RESULTS, '*', $HTTP_GET_VARS['page']);

 

after making this change, I got everything to work just great.

 

I have only tried this on a most recent snapshot.

 

frankj :D

 

Mine works fine with the orignial code. When I look at the splitPageResults function

 

function splitPageResults(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows) {

 

it looks like your solution would put the parameters in the wrong order. Is your splitPageResults function defined differently? Which snapshot are you using? I'm using 5/18/03.

Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.

Link to comment
Share on other sites

I am using a snapshot from a month later 6/15/03. Don't know why this is so different, but it seems to work fine for me with the change I noted.

 

frankj

Link to comment
Share on other sites

In comparing the code from the 6/15/03 snapshot for categories.php and the modded code for faqdesk.php I was able to get all 3 images for the questions to show up by adjusting the faqdesk.php code to look more like the categories code.

 

Specifically the new upload code.

 

----------------------------------

 

if ($faqdesk_image = new upload('faqdesk_image', DIR_FS_CATALOG_IMAGES)) {

$faqdesk_image_name = $faqdesk_image->filename;

} else {

$faqdesk_image_name = $HTTP_POST_VARS['products_previous_image'];

}

 

if ($faqdesk_image_two = new upload('faqdesk_image_two', DIR_FS_CATALOG_IMAGES)) {

$faqdesk_image_name_two = $faqdesk_image_two->filename;

} else {

$faqdesk_image_name_two = $HTTP_POST_VARS['products_previous_image_two'];

}

 

if ($faqdesk_image_three = new upload('faqdesk_image_three', DIR_FS_CATALOG_IMAGES)) {

$faqdesk_image_name_three = $faqdesk_image_three->filename;

} else {

$faqdesk_image_name_three = $HTTP_POST_VARS['products_previous_image_three'];

}

 

-----------------------------------

ie; change image_three_name to image_name_three etc.

 

I hope this helps those of you trying to debug this great contribution.

 

frankj :D

Link to comment
Share on other sites

  • 2 weeks later...

I just installed this and it looks to be a great contribution, except that everytime I click the preview button for a new FAQ, IE6 crashes.

 

I notice a few others have had this problem too but did anyone fix it?

 

I'm using MS1 so it's not a problem with the newer upload class. I'm guessing it is something to do with the HTML editor...

tobz

 

osCommerce Links

osCommerce Templates

osCommerce UK <-- This site is for sale!

Link to comment
Share on other sites

  • 5 weeks later...

Just went through this entire thread but no ones has seem to have had the problem I'm now having.

 

Do to stupid me deleting a certain table, I had to re-install my cart from scratch. I now have everything back the way it was except this time around the FAQ Desk is not working.

 

When I'm in admin and choose to add a new question, I received the following error under the heading "Short Answer":

 

Warning: main(includes/modules/faqdesk/html_editor_images/summary_bb.php): failed to open stream: No such file or directory in /admin/faqdesk.php on line 548

 

I checked the FAQ Desk files and notice that in the package there was no html_editor_images directory or summary_bb.php file so why would that directory and file be listed in faqdesk.php?

Link to comment
Share on other sites

  • 4 weeks later...

Hey guys,

I am using the FAQDesk contrib, the admin side works like a charm, but on the catalog side, i am getting the following error :

 

Warning: Failed opening 'includes/boxes/faqdesk.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site1/fst/var/www/html/catalog/includes/column_right.php on line 42



Warning: Failed opening 'includes/boxes/faqdesk_latest.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site1/fst/var/www/html/catalog/includes/column_right.php on line 43

 

Can anyone help?

The late twentieth century has witnessed a remarkable growth in scientific interest in the subject of extinction

----------------------------------------------------

Arpit

Link to comment
Share on other sites

I have tried to get this FAQ mod to work for a day now and I have had no luck I can't add catagories in the admin section. I see no boxes in the catalog area. and IE6 locks up. I have made all the changes in the this post and nothing works. I am running V2.2 MS2

 

I really need this mod for my site but I can't understand why it is such a problem to get it working... I also want the News mod but I don't want to have the same level of problems as I have had with this one.

 

Can anyone tell me the trick to get this working with V2.2 MS2 in a clear and to the point message?

Link to comment
Share on other sites

I'm sorry but the reason this mod doesn't work is because somebody who does the coding for osC decide to make changes and not care to tell developers like me.

 

makes you feel real good to give back to community :oops:

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

I understand what you are saying I am also a application programmer and I feel your pain. I love the fact you took the time to develop this mod I just wish I could get it to work.

 

From what I can see things have to be developed only for the MS1 and MS2 releases because any other version that is a milestone release the user will not be given a upgrade path to in the furtue.

 

So I would think that if your version works out of the box for MS1 then they should not post it as a MS2 release until you decide to upgrade your code and post a MS2 release.

 

Anyways I have read that you are working on a new version for MS2 can you tell me when it will be ready and also your newsdesk release? I really want these features on my site because it makes the product complete in my opinion.

 

These two features should be in the base product so it become a complete solution for the people that install OSC.

 

GIZMO

Link to comment
Share on other sites

I, like may others am gettinthe following error

1064 - You have an error in your SQL syntax near 'select pd.faqdesk_answer_long, pd.faqdesk_answer_short, p.faqdesk_id, p.faqdesk' at line 1



select count(select pd.faqdesk_answer_long, pd.faqdesk_answer_short, p.faqdesk_id, p.faqdesk_date_added, pd.faqdesk_question, pd.faqdesk_answer_long, pd.faqdesk_answer_short from faqdesk_description pd, faqdesk p, faqdesk_to_categories p2c where p.faqdesk_status = '1' and p.faqdesk_id = p2c.faqdesk_id and pd.faqdesk_id = p2c.faqdesk_id and pd.language_id = '1' and p2c.categories_id = '2' order by pd.faqdesk_question) as total 



[TEP STOP]

 

I saw the problem listed but no fix (atleast not what I saw) Any help for this????

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

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