Issue Details (XML | Word | Printable)

Key: MDL-9751
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Eloy Lafuente (stronk7)
Reporter: D P
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

ORA-01704: content of a wiki page is too long, when trying to save

Created: 09/May/07 04:29 PM   Updated: 06/Aug/07 06:55 AM
Return to search
Component/s: Database SQL/XMLDB
Affects Version/s: 1.7, 1.7.1, 1.7.2, 1.8
Fix Version/s: 1.7.3, 1.8.3, 1.9

Environment:
Solaris 10,
Oracle 10g

Database: Oracle
URL: /mod/wiki/view.php...
Participants: D P and Eloy Lafuente (stronk7)
Security Level: None
Resolved date: 06/Aug/07
Affected Branches: MOODLE_17_STABLE, MOODLE_18_STABLE
Fixed Branches: MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
Someone wanted to save a really long wiki page and got only [[errorsaving]] as error-message (its from within ewiki.php)
The following ORA error message is thrown, when developer messages are on:

ORA-04098: trigger 'ORA_MONITOR.ALERT_TR_ERRORS' is invalid and failed re-validation ORA-01704: string literal too long

INSERT INTO m_wiki_pages ( PAGENAME, VERSION, FLAGS, CONTENT, AUTHOR, USERID, CREATED, LASTMODIFIED, REFS, META, HITS, WIKI ) VALUES ( 'Übungsaufgabe 2.1 - Antwort', 4, 1, '
.......
here comes the really huge content text of the wiki page...approximately 3900 characters
.......
', 'dednis drotger (123.134.62.153:2362)', 3, 1177657076, 1178630599, ' Sozialversicherungsbeiträge Sozialbeiträge Prioritäten Einschränkung Ausbildungsplätzen Universität Tertiärbereich ', '', 106, 312 );

Do you have to use a special variable for this INSERT
or is the (clob,4000) column for "content" too short?!

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
D P added a comment - 10/May/07 10:46 PM
maybe this helps...

www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_lobs.html


D P added a comment - 16/May/07 07:24 PM
Okay, that was tough...(where are you, Eloy?!)

At line 126 of /mod/wiki/ewikimoodlelib.php

  1. change args-array to object...
    $wikidennis = new object();
    foreach ($args as $index => $value) {
    error_log("[ewikimoodlelib]: index: $index and value: $value");
    $wikidennis->$index = $value;
    }
  1. Write
    $result=insert_record(EWIKI_DB_TABLE_NAME,$wikidennis,false);

Eloy Lafuente (stronk7) added a comment - 06/Aug/07 06:42 AM
Hi Dennis,

at first step I've added some checks both in insert_record() and update_record() to detect, fix and debug about records passed as arrays (18_STABLE and HEAD).

Now I'm going to apply your code from 17_STABLE to HEAD... Thanks!


Eloy Lafuente (stronk7) added a comment - 06/Aug/07 06:55 AM
Should be working now (1.7, 1.8 and 1.9). Closing. Thanks!

P.S.: Instead of iterating over the array, I've used one simpler cast to object.