Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25
  1. #1
    Senior Member mafunk's Avatar
    Join Date
    Sep 2003
    Posts
    115
    Member #
    3277
    Hi,

    I hired a coder to build this site http://www.colishcreations.com and it's having some problems - I'm hoping that one of you osc gurus can help me with this. Since then I've started building the osc sites on my own, but for now I still have this little problem site to fix and can't seem to figure the error out. I know the answer is probably staring me in the face, but I can't find it.

    When my client tries to add attributes she gets this error:
    1136 - Column count doesn't match value count at row 1
    insert into products_attributes values ('', '43', '2', '3', '0', '+')
    [TEP STOP]

    Any ideas on how to fix?
    This is how I read the attribute values
    ' ' - not sure what this refers to - it seems that this referes to a blank space in one of the value fields, but I can't figure out why. I think that the product ID should be coming up there

    43 - Product Name

    2 - Option Name

    3 - Option Value

    0 - Value Price

    + - Prefix


    So do you have any ideas on how to fix this?

    The attributes to the products that were originally added to the store can be modified just fine. However when my client tries to add attributes to the newly added products she gets the error message. She did a fine job adding the products so its not a problem there.



    Thanks
    MaFunk

  2.  

  3. #2
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Hi.
    I'm far from any guru, but I get a simmilar error message if I try to insert a mismatching number of values with regard to number of columns.
    If you're not updating every column value, you should specify which columns to be updated prior to the value inserts.
    S. Rosland

  4. #3
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    137 times
    ('', '43', '2', '3', '0', '+')

    There's 2 single quotes at the beginning, that's a value you haven't mentioned.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  5. #4
    Senior Member mafunk's Avatar
    Join Date
    Sep 2003
    Posts
    115
    Member #
    3277
    yeah - that's the problem. That value should fall unde the product ID number, which is column that I can not input a value into (at least not in the admin panel). Rather, that value should be generated automatically by the program.

    The values align in the attributes admin panel as follows:
    ID - the 2 single quotes, which the admin panel says should have a value of 128, but doesn't show up in the error message.

    Product Name - 43
    Option Name - 2
    Option Value - 3
    Value Price - 0

    Prefix - +

    Action - this isn't accounted for in the above. It is the column where you can add or delete info

  6. #5
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    It sounds like a variable possibly wasn't set right or something along those lines.

    Originally posted by mafunk
    that value should be generated automatically by the program.
    Which program are you refering to? PHP or MySQL ? If you are using php, could you try posting the code of the page in question? It would do a great deal of help...
    - Brian

  7. #6
    Senior Member mafunk's Avatar
    Join Date
    Sep 2003
    Posts
    115
    Member #
    3277
    I'm using php. Here is a link to the page:

    http://www.colishcreations.com/catal...bd6aca8bce51b5

    And here is a link to the error page:
    http://www.colishcreations.com/admin...ttribute_page=

    Does that help? Can you just view source code?

  8. #7
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    137 times
    Not for PHP we can't. PHP is a server-side language, which means it processes the request, then spits out the HTML for the browser. Also, the error page is PW protected. Try copying and pasting the relevant code here.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  9. #8
    Senior Member mafunk's Avatar
    Join Date
    Sep 2003
    Posts
    115
    Member #
    3277
    Ok - I know where to find all the includes, but don't know where I'm supposed to find the attributes section.

    This is the include that generates the store page that displays the product attributes:
    <?php
    /*
    $Id: header.php,v 1.39 2003/02/13 04:23:23 hpdl Exp $

    osCommerce, Open Source E-Commerce Solutions
    http://www.oscommerce.com

    Copyright (c) 2003 osCommerce

    Released under the GNU General Public License
    */

    // check if the 'install' directory exists, and warn of its existence
    if (WARN_INSTALL_EXISTENCE == 'true') {
    if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
    tep_output_warning(WARNING_INSTALL_DIRECTORY_EXIST S);
    }
    }

    // check if the configure.php file is writeable
    if (WARN_CONFIG_WRITEABLE == 'true') {
    if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
    tep_output_warning(WARNING_CONFIG_FILE_WRITEABLE);
    }
    }

    // check if the session folder is writeable
    if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
    if (STORE_SESSIONS == '') {
    if (!is_dir(tep_session_save_path())) {
    tep_output_warning(WARNING_SESSION_DIRECTORY_NON_E XISTENT);
    } elseif (!is_writeable(tep_session_save_path())) {
    tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_W RITEABLE);
    }
    }
    }

    // check session.auto_start is disabled
    if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
    if (ini_get('session.auto_start') == '1') {
    tep_output_warning(WARNING_SESSION_AUTO_START);
    }
    }

    if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
    if (!is_dir(DIR_FS_DOWNLOAD)) {
    tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_ EXISTENT);
    }
    }
    ?>
    <Script language="JavaScript" TYPE="text/javascript">
    <!--
    // browser test:

    if ((navigator.appName== "Netscape" && parseInt(navigator.appVersion) >= 3)|| (navigator.appName.indexOf("Microsoft") != -1 && parseInt(navigator.appVersion) > 3)) {

    browserVer = '1';

    } else {

    browserVer = '2';

    }

    // preload universal images:

    if (browserVer == 1) {

    a = new Image(60,13);
    a.src = "/images/btabout_bert.gif";
    ax = new Image(60,13);
    ax.src = "/images/2btabout_bert.gif";

    b = new Image(53,13);
    b.src = "/images/bt_originals.gif";
    bx = new Image(53,13);
    bx.src = "/images/2bt_originals.gif";

    c = new Image(92,13);
    c.src = "/images/bt_limited.gif";
    cx = new Image(92,13);
    cx.src = "/images/2bt_limited.gif";

    d = new Image(36,13);
    d.src = "/images/bt_events.gif";
    dx = new Image(36,13);
    dx.src = "/images/2bt_events.gif";

    e = new Image(27,13);
    e.src = "/images/bt_news.gif";
    ex = new Image(27,13);
    ex.src = "/images/2bt_news.gif";

    f = new Image(85,13);
    f.src = "/images/bt_creative.gif";
    fx = new Image(85,13);
    fx.src = "/images/2bt_creative.gif";

    g = new Image(43,13);
    g.src = "/images/bt_contact.gif";
    gx = new Image(43,13);
    gx.src = "/images/2bt_contact.gif";

    }

    function hiLite(imgDocID,imgObjName) {

    // manages mouseOver animations
    // imgDocID - the name or number of the document image to be replaced
    // imgObjName - the name of the image object to be swapped in

    if (browserVer == 1) {

    document.images[imgDocID].src = eval(imgObjName + ".src")

    }

    else {

    return;

    }

    }

    // animate the "revolution" image:

    revNum = 1

    function animRev() {

    if (browserVer == 1) {

    document.revolution.src = "/img/light/revolution" + revNum + ".jpg"

    revNum++

    if(revNum > 4) {revNum = 1}

    }

    }

    // -->
    </script>
    <link href="/css/style.css" type="text/css" rel="stylesheet">
    <style>
    a {text-decoration:none;'}
    </style>
    </head>

    <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0" class="body_order" link="#3366cc" vlink="#3366cc" alink="#3366cc">
    <!-- top headers and title starts here... -->
    <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
    <tr>
    <td valign="middle" align="center"><table cellpadding="0" cellspacing="0" border="0" width="770" height="108" class="grey_background">
    <tr>
    <td valign="top"><img src="/images/spacer.gif" width="28" height="10" border="0">
    <img src="/images/spacer.gif" width="10" height="32" border="0"><br>
    <img src="/images/spacer.gif" width="28" height="10" border="0">
    <a href="/originals.shtml"><img src="/images/subtitle_originals.gif" width="121" height="30" border="0"></a></td>
    </tr>
    <tr>
    <td align="right"><table cellpadding="0" cellspacing="0" border="0" width="350">

    <tr>
    <td><img src="/images/spacer.gif" alt="" width="10" height="10" border="0"></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <!-- ...ends here -->

    <!-- main content starts here... -->
    <table cellpadding="0" cellspacing="0" border="0" width="770" height="276">
    <tr>
    <td><table cellpadding="0" cellspacing="0" border="0">
    <tr>
    <td class="leftmenubar"><table cellpadding="0" cellspacing="0" border="0" width="140" height="450">
    <tr>
    <td align="center" class="leftmenubar" valign=top>

    <p> <br>Original Oil<br> on Canvas<br><br>48" x 36"</p><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br>
    </td>
    </tr>
    <tr>
    <td valign="top" height="150"></td>
    </tr>
    <tr>
    <td valign="top" align="center"></td>
    </tr>
    </table></td>

    <td valign="top" class="mainbody"><table cellpadding="0" cellspacing="0" border="0" width="630">
    <tr>
    <td colspan="4"><img src="/images/spacer.gif" width="100" height="20" border="0"></td>
    </tr>
    <tr>
    <td><img src="/images/spacer.gif" width="15" height="100" border="0"></td>
    <td valign="top">
    <td valign="top">

    <?php
    if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr class="headerError">
    <td class="headerError"><?php echo urldecode($HTTP_GET_VARS['error_message']); ?></td>
    </tr>
    </table>
    <?php
    }

    if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr class="headerInfo">
    <td class="headerInfo"><?php echo $HTTP_GET_VARS['info_message']; ?></td>
    </tr>
    </table>
    <?php
    }
    ?>

  10. #9
    Senior Member mafunk's Avatar
    Join Date
    Sep 2003
    Posts
    115
    Member #
    3277
    $25 to first person that can fix this

    Ok - It's been almost a week and the best that I get from the coders of this site are "It's not from an error that we made, but an osc problem/erro". Which is bull-sh*t since I don't have this problem with any other osc sites that I built on my own!!!! I'm just so peaved off at these people. Working with them was a nightmare and I had to fix a couple of obvious things that they screwed up!!! - like they didn't put permissions on the folder so that my client could make changes!!!

    OK, enough ranting and raving. I need help. If you are a true guru, and think that can fix this, I'll pay $25 (via paypal) for the person that can make it happen. Just tell me which files you need to see. I'll send you the code. Then I'll make the updates myself.

    Cheers,
    MaFunk

  11. #10
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Ok, I understand that you're desperate.

    The problem seems relatively simple... the INSERT statement is improperly formatted. It seems to me that this would be an OS Commerce bug, and should be reported to them so that they can account for it in their next release (remember, as an OS Software user, it's your responsibility to report bugs like this for the good of the community).

    As for how to fix the problem, just open up every PHP file included in the OSC software and do a global search for "insert into" or "products_attributes" using an IDE that can do multi-file searches. That will pin-point the location of your problem. From there, post the source surrounding the problem and we'll take a look at it.


Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:32 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com