Hello, guest. We have noticed that you are not registered at this bug tracker. Your experience will be greatly enhanced if you log in. To do so, you first must register by clicking on the Register tab at the top. If you are already registered, you can login at the Login tab.
Syndicate Syndicate Listing Display Search Login/Register
Bug Id ?
Reporter ?
RAD Moose
Product/Version ?
Bugdar / 1.2.2
Status ?
Closed
Severity ?
Critical
Duplicate Of ?
- none -
Fixed in Revision ?
Mstone ?
Summary ?
Version Number Error ver1build080916050741
Report Time ?
October 12, 2008 10:41 AM
Assignment ?
Resolution ?
Won't Fix
Priority ?
Normal
Dependencies ?
- none -
Mstone (old) ?


Attachments
version.sql Version SQL Dump
product.sql Product SQL Dump
Votes
For: 0 (0%)
Against: 0 (0%)
Total: 0

October 12, 2008 10:41 AM RAD Moose
When attempting to add a version (2.9.7) to a component, the version keeps displaying the same thing.

ver1build080916050741


October 12, 2008 02:56 PM Robert
I can't reproduce this by just entering the version "2.9.7". Can you please run these queries and then upload their output as an attachment:

SELECT * FROM product;
SELECT * FROM version;

You can do that via phpMyAdmin by running those queries and then pressing the "Export" link. Exporting them as SQL is fine.

October 12, 2008 10:03 PM RAD Moose
Export of version table

October 12, 2008 10:04 PM RAD Moose
Export of product table

October 12, 2008 10:05 PM RAD Moose
I haven't done anything else since this happened twice with trying to enter the version number for the product.

If there are any further tests you would like me to conduct, please let me know.

October 12, 2008 10:57 PM Robert
That's quite odd. What happens if you edit the version "ver1build080916050741" or similar and try to change it to 2.9.7? Is this a problem with making new versions or editing existing ones, too?

Finally, open admin/product.php and find:

if ($_REQUEST['do'] == 'insertversion')
{
$db->query("INSERT INTO " . TABLE_PREFIX . "version (productid, version, displayorder, obsolete) VALUES (" . $input->inputClean('productid', TYPE_UINT) . ", '" . $bugsys->input_escape('version') . "', " . $input->inputClean('displayorder', TYPE_UINT) . ", " . $input->inputClean('obsolete', TYPE_UINT) . ")");
build_versions();
$admin->redirect('product.php?do=modify');
}

TEMPORARILY replace it with this:

if ($_REQUEST['do'] == 'insertversion')
{
echo '<pre>';
echo "_REQUEST: '" . $_REQUEST['version'] . "'\n";
echo "_POST: '" . $_POST['version'] . "'\n";
echo "_COOKIE: '" . $_COOKIE['version'] . "'\n";
echo "Input->in: '" . $bugsys->in['version'] . "'\n";
echo '</pre>';
}

Please post the results. I have a feeling that some other input value is overwriting $bugsys->in[].

October 13, 2008 09:56 AM RAD Moose
If I try to edit it, it goes back to the same value.

when I tried to add it again, I got the second item with the ver... info.

After I make the changes, what do you want me to do to trigger the code?

Insert a new version?

October 13, 2008 01:23 PM Robert
Just to clarify, editing behaves *correctly*? Please try creating a new version after making that temporary code change.

October 14, 2008 08:48 AM RAD Moose
No, it does not behave correctly when editing. If I try to edit the version, it stays the same (ver1build080916050741)

So, I will make the temp code change, add a new version to the component and give you the output.

(Sorry, been really busy, and it isn't always a good idea to be posting bugs so late at night =)

October 15, 2008 02:48 AM RAD Moose
_REQUEST: 'ver1build080916050741'
_POST: '2.9.7'
_COOKIE: 'ver1build080916050741'
Input->in: 'ver1build080916050741'

I added it to the same item.

I then tried it on another item (Google Analytics)

When adding 2.9.7, I got the above response, so I tried a different input and here are the (same) results.

_REQUEST: 'ver1build080916050741'
_POST: '29392'
_COOKIE: 'ver1build080916050741'
Input->in: 'ver1build080916050741'



October 17, 2008 12:29 AM Robert
You have a cookie named "version" -- that's what causing this. It's over-writing the POST data. I'm not sure what the best fix for this is...

October 17, 2008 08:06 AM RAD Moose
I will try to figure out where that is being set (I am guessing it is something Ver. 1 on September 16, 2008 at 5:07:41AM)

Based upon the few other scripts that run on the site, nothing comes to mind.

I did delete the cookie, and went thru the site and could not find anywhere that set the cookie.

I also went into bugdar and was able to edit the version numbers successfully.

Sorry for the "bug". If I find out where it is set, I will let you know.

Thank you for your continuing support!