Hello,

I’ve got a project module installed on my website, I’ve created a project (with appropriate categories etc)

However once users submit a bug/feature nothing is archived on the site. (The project lists no support requests)

Just after clicking ‘submit’ the user gets this on the screen:

Project:
Component:
Category:
Priority:
Assigned: Unassigned
Status:

..... which would explain why they aren't being saved to my project!

Any suggestions to which settings I should change to make things save properly ?

Thanks

Comments

aclight’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide the following information so that we can better help you:
1. Version of project issue and project modules used on your site.
2. Are there any errors displayed either on the pages or in your watchdog log that seem to be related?
3. What modules, including versions, are enabled on your site? Please include both core and contrib modules.
4. Is this a new installation and a new site, or did you have project issues working before and then upgraded and lost functionality? If this was working before, are only new issues not being saved or have old issues that previously existed disappeared as well?

gonzorob’s picture

Hi,

1) Project 5.x-1.2 and Project issue tracking 5.x-2.x-dev - (also tried latest stable release)

2) I do get an error in watchdog - not certain if it has anything to do with project.. it is;

Type php
Date Wednesday, July 16, 2008 - 13:16
User Robin
Location http://plainsightgame.com/?q=admin/logs/watchdog
Referrer http://plainsightgame.com/
Message preg_match() expects parameter 2 to be string, array given in C:\www.plainsightgame.com\includes\bootstrap.inc on line 670.
Severity error
Hostname 87.236.135.80

3) A list of my modules are below ...

4) This is a new site and my first install of Project. It can be viewed at www.plainsightgame.com

ive created a temp account - username + password: testbeta

thanks
Robin

modules
ACL 5.x-1.6
Forum Access 5.x-1.10
Action email role 5.x-2.x-dev
Actions 5.x-2.5
Administration Menu 5.x-2.5
Aggregator 5.8
Blog 5.8
Blog API 5.8
Book 5.8
Color 5.8
Comment 5.8
Forum 5.8
Help 5.8
Menu 5.8
Ping 5.8
Search 5.8
Taxonomy 5.8
Tracker 5.8
Upload 5.8
Block 5.8
Filter 5.8
Node 5.8
System 5.8
User 5.8
Watchdog 5.8
Invite 5.x-1.13
Invite Statistics 5.x-1.13
Privatemsg 5.x-1.8
Usernode 5.x-1.4
Advanced Forum 5.x-1.0-alpha10
BUEditor 5.x-1.1
Comment upload 5.x-0.1
Google Analytics 5.x-1.6
Legal 5.x-1.3
Menu Per Role 5.x-1.x-dev
Quick Tabs 5.x-1.3
Token 5.x-1.11
Video Filter 5.x-2.4
Project 5.x-1.2
Project issue tracking 5.x-2.x-dev
Project releases 5.x-1.2
Project usage 5.x-1.2
Signatures for forums 5.x-2.3
Apply for role 5.x-1.4
Role 5.x-3.0
Role exempt 5.x-3.0
User Points Top Contributors 5.x-1.0
Userpoints 5.x-3.7
Userpoints Autoapprove 5.x-3.0
Userpoints Basic 5.x-3.7
Views Integration 5.x-3.7
Views 5.x-1.6
Views RSS 5.x-1.6
Views Theme Wizard 5.x-1.6
Views UI 5.x-1.6

gonzorob’s picture

Status: Postponed (maintainer needs more info) » Postponed

going to re install, start by getting project working and building the site up from there......

gonzorob’s picture

Status: Postponed » Active

this appears to to be the problem. Project issues isn't creating a database table:

error is :

 * user warning: Table 'plainsight.project_issues' doesn't exist query: SELECT COUNT(DISTINCT(n.nid)) FROM node n INNER JOIN project_issues p ON p.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON p.assigned = u.uid LEFT JOIN comments c ON c.nid = p.nid LEFT JOIN comment_upload_files cu ON p.nid = cu.nid LEFT JOIN files f ON n.nid = f.nid WHERE n.status = 1 AND (((n.uid = '1') OR (p.assigned = '1') OR (c.uid = '1'))) AND ((p.sid = '1' OR p.sid = '2' OR p.sid = '4')) in C:\www.plainsightgame.com\includes\database.mysql.inc on line 172.
    * user warning: Table 'plainsight.project_issues' doesn't exist query: SELECT DISTINCT(n.nid), n.changed FROM node n INNER JOIN project_issues p ON p.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON p.assigned = u.uid LEFT JOIN comments c ON c.nid = p.nid LEFT JOIN comment_upload_files cu ON p.nid = cu.nid LEFT JOIN files f ON n.nid = f.nid WHERE n.status = 1 AND (((n.uid = '1') OR (p.assigned = '1') OR (c.uid = '1'))) AND ((p.sid = '1' OR p.sid = '2' OR p.sid = '4')) ORDER BY n.changed DESC LIMIT 0, 20 in C:\www.plainsightgame.com\includes\database.mysql.inc on line 172. 

... I can make this table manually - but what fields do i need?

thanks

Rob

PS: I've wiped the site so, obviously, previous l+p wont work ;)

aclight’s picture

Status: Active » Postponed (maintainer needs more info)

What are you doing/where are you going that gives you this error message?

Can you look into your database and actually confirm that the project_issues table does not exist? I can't see how it would not exist if you are building your site from scratch and are not updating an existing installation. Are you sure that you've enabled the project issue tracking module already?

gonzorob’s picture

i've just done a fresh install. I get this error the moment i enable Project issues module

What ive done:

1) Wipe old website directory and database table
2) Fresh install of Drupal 5.8
3) Install + enable Project module - works fine
4) Install + enable Comment Upload module - works fine
5) Enable Upload module - fine
6) Install + enable Project issues - get the error..

Checked again, there is no database table..

There is nothing else on the site.

Cheers

aclight’s picture

You're getting this page when you're on /admin/build/modules or some other page?

You're installing project 5.x-1.2 and project issue 5.x-2.x dev?

gonzorob’s picture

i get this on admin/build/modules and project/issues

that's correct :
Project Issue 2.2 (latest stable)
Project 1.2 (latest stable)

checked the database for any other errors - none found. Did yet another install, same error :



    * user warning: Table 'plainsight.project_issues' doesn't exist query: SELECT COUNT(n.nid) FROM node n INNER JOIN project_issues p ON p.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON p.assigned = u.uid WHERE n.status = 1 AND ((p.sid = '1' OR p.sid = '2' OR p.sid = '4')) in C:\www.plainsightgame.com\includes\database.mysql.inc on line 172.
    * user warning: Table 'plainsight.project_issues' doesn't exist query: SELECT n.nid FROM node n INNER JOIN project_issues p ON p.nid = n.nid INNER JOIN node_revisions r ON r.vid = n.vid INNER JOIN users u ON p.assigned = u.uid WHERE n.status = 1 AND ((p.sid = '1' OR p.sid = '2' OR p.sid = '4')) ORDER BY n.changed DESC LIMIT 0, 20 in C:\www.plainsightgame.com\includes\database.mysql.inc on line 172.

gonzorob’s picture

in MYSQL I used this :

CREATE TABLE project_issues (
  nid int NOT NULL default '0',
  pid int NOT NULL default '0',
  fid int NOT NULL default '0',
  category varchar(255) NOT NULL default '',
  component varchar(255) NOT NULL default '',
  priority smallint NOT NULL default '0',
  rid int NOT NULL default '0',
  assigned int NOT NULL default '0',
  state smallint NOT NULL default '0',
  PRIMARY KEY (nid)
);
CREATE INDEX project_issues_pid ON project_issues(pid);

ALTER TABLE project_issues DROP fid;
ALTER TABLE project_issues ADD file_path varchar(255);
ALTER TABLE project_issues ALTER file_path SET NOT NULL;
ALTER TABLE project_issues ALTER file_path SET default '';
ALTER TABLE project_issues ADD file_mime varchar(255);
ALTER TABLE project_issues ALTER file_mime SET default '';
ALTER TABLE project_issues ALTER file_mime SET NOT NULL;
ALTER TABLE project_issues ADD file_size int;
ALTER TABLE project_issues ALTER file_size SET default 0;
ALTER TABLE project_issues ALTER file_size SET NOT NULL;

then manually made a SID entry... seems to have solved the issue - will report back if im wrong !

cheers

aclight’s picture

Title: Issues not being saved: » {project_issues} table not being created when module is enabled

I'm not sure why you think you needed to do all of the ALTER TABLE commands above. If you're pulling the original CREATE statement out of project_issue_install(), then that's all you need.

That being said, I would not be comfortable with continuing to use the module on a production site if its not installing correctly. I don't have my dev machine near me, and so can't test out the same steps you've gone through to try to reproduce the problem you've reported, but I must admit I have a hard time believing that you are getting this problem. It seems like project_issue_install() isn't firing, or isn't completing successfully, and I don't have a good explanation as to how that could happen.

Have you tried doing this using Drupal 5.7 instead of 5.8? I have not yet tried installing/enabling the module in 5.8, and there's always the possibility that a new core bug was introduced somehow.

gonzorob’s picture

i agree, the alter table commands aren't needed (just copied and pasted it from another source) .

from the .install - this works :

CREATE TABLE project_issues (
          nid int(10) unsigned NOT NULL default '0',
          pid int(10) unsigned NOT NULL default '0',
          category varchar(255) NOT NULL default '',
          component varchar(255) NOT NULL default '',
          priority tinyint(3) unsigned NOT NULL default '0',
          rid int(10) unsigned NOT NULL default '0',
          assigned int(10) unsigned NOT NULL default '0',
          sid int(10) unsigned NOT NULL default '0',
          original_issue_data text NOT NULL,
          last_comment_id int NOT NULL default 0,
          db_lock tinyint NOT NULL default 0,
          PRIMARY KEY (nid),
          KEY project_issues_pid (pid),
          KEY project_issues_sid (sid),
          KEY project_issues_nid_assigned (nid, assigned)
          );
        

and then.....

              CREATE INDEX project_issues_pid_idx ON project_issues(pid);
	      CREATE INDEX project_issues_sid_idx ON project_issues(sid);
	      CREATE INDEX project_issues_nid_assigned_idx ON project_issues(nid, assigned);

I havent tried this on 5.7 yet, will give it a crack tomorrow

What seems to be failing in the .install is this :
ERROR 1101 (42000): BLOB/TEXT column 'original_issue_data' can't have a default value

hence why i changed: original_issue_data text NOT NULL default '',
to :
original_issue_data text NOT NULL,

seems to work ... im going to give it some testing and report back (god knows what else the .install missed ;) )

aclight’s picture

Are you getting this error message when you enable the module, or only when you try to manually execute those MySQL statements:

ERROR 1101 (42000): BLOB/TEXT column 'original_issue_data' can't have a default value

Also, what version of MySQL are you using?

gonzorob’s picture

im getting the error when i manually execute the mySQL statement - but, if it failed during the .install, then that could explain why there is no project_issues table

My system:
Drupal 5.8
Configuration file Protected
Cron maintenance tasks Last run 2 hours 39 min ago
You can run cron manually.
Database schema Up to date
File system Writable (private download method)
GD library bundled (2.0.34 compatible)
MySQL database 5.0.51a
PHP 5.2.5
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache/2.0.59 (Win32) PHP/5.2.5 DAV/2

you think thats it?

Also, thanks very much for all your help!

Robin

aclight’s picture

I doubt the MySQL version is a problem, since it looks like you're running a fairly recent version. I test on 5.something, so I thought if you were running something quite old that could be the reason I've never seen this.

aclight’s picture

I just tried this for myself on a clean install following the steps you gave in comment #6 and I'm unable to get an error and the project issue tracking module installs just fine.

Here's my server information:
Drupal 5.8
Configuration file Protected
Cron maintenance tasks Last run 2 min 11 sec ago
You can run cron manually.
Database schema Up to date
File system Writable (public download method)
GD library 2.0 or higher
MySQL database 5.0.45
PHP 5.2.3-1ubuntu6.3
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache/2.2.4 (Ubuntu) DAV/2 SVN/1.4.4 PHP/5.2.3-1ubuntu6.3 mod_ssl/2.2.4 OpenSSL/0.9.8e

I'm on Linux, you're on Windows. Our Apache versions are a bit different, but I don't think either of these should matter.

You're using private file downloads, and I'm using public, but I also tried uninstalling the project issue module, setting download method to private, and then re-enabled the module and still didn't have any problems.

So, I'm not sure what to tell you. Maybe you should try this on a Linux/MacOS machine if you have one available to exclude the possibility that your problem is somehow Windows related. However, I have a development machine that also runs Windows and have had no problem installing the project issue module on it, so I doubt this is the source of your problem.

Without being able to reproduce this, I can't help you much more. I'll leave the issue open for a bit in case you're able to provide additional information that helps us to reproduce the problem.

BTW, you're not manually running previous updates from the project_issue module *after* enabling/installing the module are you?

gonzorob’s picture

tried this on a 5.7 install -same issue !

anyway, after playing around, i found out the the same error stopped project_issues_comments being made...

so, once again, I manually ran:

CREATE TABLE project_issue_comments (
          nid int(11) default NULL,
          cid int(11) default NULL,
          rid int(11) NOT NULL default '0',
          component varchar(255) NOT NULL default '',
          category varchar(255) NOT NULL default '',
          priority int(11) NOT NULL default '0',
          assigned int(11) NOT NULL default '0',
          sid int(11) NOT NULL default '0',
          pid int(10) unsigned NOT NULL default '0',
          title varchar(255) NOT NULL,
          timestamp int(10) unsigned NOT NULL,
          original_issue_data text NOT NULL default '',
          PRIMARY KEY(cid),
          INDEX nid_timestamp (nid, timestamp)
        )

this has finally fixed the issue. Project issue tracking now works fine.

Must admit it's a very odd error - it's probably just my system however, if anyone else has this issue, hopefully they can solve it in the same way ;)

thanks again for all your help

gonzorob’s picture

sorry , i meant :

CREATE TABLE project_issue_comments (
          nid int(11) default NULL,
          cid int(11) default NULL,
          rid int(11) NOT NULL default '0',
          component varchar(255) NOT NULL default '',
          category varchar(255) NOT NULL default '',
          priority int(11) NOT NULL default '0',
          assigned int(11) NOT NULL default '0',
          sid int(11) NOT NULL default '0',
          pid int(10) unsigned NOT NULL default '0',
          title varchar(255) NOT NULL,
          timestamp int(10) unsigned NOT NULL,
          original_issue_data text NOT NULL,
          PRIMARY KEY(cid),
          INDEX nid_timestamp (nid, timestamp)
        );

[forgot to chop default '' ! ]

----

NOTE: Also, to stop additional errors I had to change both 'original_issue_data' fields to VARCHAR - this is because the TEXT type can't have the Default entry at a length of zero characters. So, change to VARCHAR, put a few spaces in the Default and increase the length to 21,000. You may like to use HeidiSQL ;) )

Im going home now!

cheers

mr.baileys’s picture

Category: support » bug

I'm having the same issue on a fresh Drupal 5.12 installation. When enabling the "Project Issue Tracker" module, I get the following error message:

user warning: BLOB/TEXT column 'original_issue_data' can't have a default value query: CREATE TABLE IF NOT EXISTS project_issues ( nid int(10) unsigned NOT NULL default '0', pid int(10) unsigned NOT NULL default '0', category varchar(255) NOT NULL default '', component varchar(255) NOT NULL default '', priority tinyint(3) unsigned NOT NULL default '0', rid int(10) unsigned NOT NULL default '0', assigned int(10) unsigned NOT NULL default '0', sid int(10) unsigned NOT NULL default '0', original_issue_data text NOT NULL default '', last_comment_id int NOT NULL default 0, db_lock tinyint NOT NULL default 0, PRIMARY KEY (nid), KEY project_issues_pid (pid), KEY project_issues_sid (sid), KEY project_issues_nid_assigned (nid, assigned) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in C:\inetpub\wwwroot\drupal-5.12\includes\database.mysql.inc on line 174.

I'm running:
MySQL 5.0.67-community-nt
Vista
IIS 7
Database server and web server are both on localhost

I have read the "MySQL 5.0 Reference Manual"-page on "The BLOB and TEXT Types", which states that BLOB and TEXT columns cannot have DEFAULT values.. Additionally, a comment added to the page (http://dev.mysql.com/doc/refman/5.0/en/blob.html#c9390) indicates that on Windows platforms, this is treated as a MySQL error, while on other platforms this is treated as a warning. This would explain why the Project Issue Tracker installation only fails in windows-environments.

Given the fact that the installation SQL script violates the "no DEFAULT"-rule on BLOB/TEXT-values in MySQL, I think this issue should be treated as a bug rather than a support request (I've changed the state accordingly).

In any case, running the statement manually without the "default"-declaration on the TEXT-column as per gonzorob's suggestion fixed the problem for me.

aclight’s picture

Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

@mr.baileys and gonzorob: Thanks for taking the time to work out the problem here. The odd thing here is that one of my development machines is a windows computer, running Vista, and MySQL 5.x. I install project* on it all the time for development and testing, yet I have never had this problem. I wonder if there is a strict mode that you two have enabled but that I don't. If so, that's probably the reason you have been getting this problem but I haven't.

The Schema API reference page at http://drupal.org/node/146939 does mention that "type 'text' and 'blob' fields cannot have default values." Schema API is only available for D6, but it seems like that warning should apply to D5 as well since that's due to database restrictions and not Drupal itself.

I'm bumping the priority of this up to critical and I've added this to the list of issues to fix before the 2.3 release (http://groups.drupal.org/node/16069), since this should be a simple fix. If would be great if one of you could roll a patch for this as well.

hunmonk’s picture

Status: Active » Needs review
StatusFileSize
new819 bytes

i think this should do the trick. untested.

mr.baileys’s picture

@aclight: I'm running MySQL in strict mode (which was enabled by default). I think the "STRICT_TRANS_TABLES"-mode is responsible for throwing the warning (although my experience with MySQL is limited). This mode was introduced in MySQL 5.0.2, so if you're running an older version, or if you disabled the strict checking in my.ini, that could explain why you don't have this issue in your windows dev environment.

MySQL my.ini file:

# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

MySQL SQL mode on my installation:

SELECT @@sql_mode
result: STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

@hunmonk: the patch works for me. Just out of curiosity, what's the rationale between removing both the "NOT NULL" constraint as well as the "DEFAULT"-constraint on the original_issue_data-column (I was creating my own patch, leaving the NOT NULL constraint in place)?

hunmonk’s picture

here's one with NOT NULL left in...

hunmonk’s picture

Status: Needs review » Fixed

committed the patch from #22 -- after some investigation it's not necessary to do a db update for this, as if the table was created by mysql, it simply tosses the errant default value declaration anyways.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.