OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Failed to insert into tblarticles table

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Failed to insert into tblarticles table

Postby kenzakreski » Wed Jan 26, 2005 10:12 am

This is a new install of OJS 1.1.8 over Apple G3 OSX php MySQL, properly configured.

My database seems to be working. I can add editors, authors, customize the set up.

Using my author account I cannot get past step 1 of the submission process. When I finish the page and press save the new window comes up with this message, Failed to insert into tblarticles table .

We have tried a couple of things and can't get the process to work, any suggestions.

Ken Zakreski, developer
gabriolaradio@shaw.ca
proposed ciuf-fm, Gabriola Co-op Radio
NCRA journal project - static
http://staticreporting.blogspot.com/

#9 - 575 North Road, Gabriola Island, BC, V0R 1X0
Ph: 250-247-9891, Fax: 250-247-9852
http://members.shaw.ca/gabriolaradio/

Host BCRC03
British Columbia Radio Conference
Sat/Sun August 30th/31st, 2003
http://members.shaw.ca/gabriolaradio/BCRC03.htm
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC

more info on set up for static

Postby kenzakreski » Wed Jan 26, 2005 10:18 am

More info on the server running OJS 1.1.8 with the message: Failed to insert into tblarticles table

Website configuration:
Custom Virtual Host
Address: nccra.learnnewmedia.ca
Root Directory: /Users/static/Sites
writeable files and folders have been set as "world" writeable rather than specific ownership (this was to facilitate migration, and avoid conflicts with MacOS X)
The following files and folders were modified:

include/db.php (world writeable for install only... now read/ex for all)
images/custom (world writeable)
images/articleimages (world writeable)

Journal settings:
Open Journal Systems
Base Url: http://nccra.learnnewmedia.ca
Files Path: /Users/static/journal_files
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC

Postby kevin » Wed Jan 26, 2005 11:59 am

Could you post the database query that fails? E.g., from your database server's log or by adding a print statement to admin/author/step1.php like:

Code: Select all
echo $query;
$db->query($query) or die("Failed to insert into tblarticles table");
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

echo statements added to step1.php

Postby kenzakreski » Fri Jan 28, 2005 2:03 pm

I added the echo statements to all the query's that stated "Failed to insert into tblarticles table" in admin/author/step1.php

After I save from submission step one this message is generated.

insert into tblarticles (fkSectionID, fkEditorID, chNotesToEditor, bNotPrevPublished, nSubmissionProgress, chMetaPublisher, chMetaType_Editor) values ('4', '1', 'reprinted - from ncra policy 1.0.2', '', 2, 'The National Campus and Community Radio Association/l'Association nationale des radios étudiantes et communautaires (NCRA/ANREC)', 'Non-Refereed ncra reports, report')Failed to insert into tblarticles table
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC

Postby kevin » Fri Jan 28, 2005 2:14 pm

Thanks, it looks like this occurs when there is a single quote character in the sponsoring organization name. Applying this patch should fix it:

Code: Select all
--- admin/author/step1.php      13 May 2004 08:40:47 -0000      1.39
+++ admin/author/step1.php      28 Jan 2005 21:11:07 -0000
@@ -96,6 +96,7 @@
                $query = $db->query("SELECT chName AS sponsor FROM tblsponsors ORDER BY nSponsorID LIMIT 1");
                if($db->num_rows($query) != 0) {
                        extract($db->assoc_array($query));
+                       $sponsor = addslashes($sponsor);
                } else {
                        $sponsor = "";
                }
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

removed single quotes from sponsoring association

Postby kenzakreski » Fri Jan 28, 2005 3:11 pm

To test the suggestion that the single quote in the sponsoring name was at fault, I removed them, then saved and exitted. resubmited under my author account new message from saving at step 1 of submission page.

insert into tblarticles (fkSectionID, fkEditorID, chNotesToEditor, bNotPrevPublished, nSubmissionProgress, chMetaPublisher, chMetaType_Editor) values ('4', '1', 'reprinted under ncra policy 1.0.2', '', 2, 'The National Campus and Community Radio Association/lAssociation nationale des radios étudiantes et communautaires (NCRA/ANREC)', 'Non-Refereed ncra reports, report')update tblarticles set chLongID = 'cjcc-2005-1', chDirectory = '2005' where nArticleID = 1insert into tblauthorstoarticles (fkAuthorID, fkArticleID) values ('2', '1')
Warning: Cannot modify header information - headers already sent by (output started at /Users/static/Sites/admin/author/step1.php:116) in /Users/static/Sites/include/functions.inc.php on line 59
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC

Postby kevin » Fri Jan 28, 2005 8:32 pm

So that was indeed the issue, I assume?
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

patch cures single apostrophe in sponsors name

Postby kenzakreski » Fri Jan 28, 2005 11:00 pm

Thank you Kevin.

My previous post showed the display if you do not remove the echo statements after removing the single apostrophes.

I added the single apostrophes back in, used the patch and all works well.
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: ojsearch and 2 guests