Hello,
I am completely new to web development and MODx. Just installed successfully Evo 1.0.12 and am working my way through MODx 2.0 Web Development book by Antano Solar John. All is fine until I try to use Rich Text editor in one of the blog examples. So I create a template variable with input type Rich Text, Widget Rich Text, change my chunk template to read:
<div id="blogpage">
<form action="[~[*id*]~]" method="post" name="NewsEditor">
<table>
<h3> Blog Entry (chunk) </h3>
<input name="NewsEditorForm" type="hidden" value="on" />
</table>
<table>
<tbody>
<tr>
<td><label for="pagetitle">Title</label></td>
<td><input id="pagetitle" name="pagetitle" size="40" type="text" value="[+pagetitle+]" /></td>
</tr>
<tr>
<td><label for="introtext">Summary</label></td>
<td><textarea cols="50" name="introtext" rows="5">[+introtext+]</textarea></td>
</tr>
<tr>
<td><label for="content">Content</label></td>
<td> [*blogRT*] </td>
</tr>
</tbody>
</table>
<input class="button" name="send" type="submit" value="Blog it!" />
</form>
</div>
I inserted the name of the template variable ([*blogRT*]) in the line where I used to have a plain text editor (that worked !).
My resource page reads: [!NewsEditor? &folder=`47` &makefolder=`1` &formtpl=`blogForm` &template=`Learning MODx blog template` &rtcontent=`blogRT` !]
When I try to preview the page I see errore:
« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error : array_key_exists(): The first argument should be either a string or an integer
ErrorType[num] : WARNING[2]
File : C:\xampp\htdocs\learningMODx\manager\includes\document.parser.class.inc.php
Line : 884
Source : if (array_key_exists($matches[1][$i], $this->config))
Basic info
REQUEST_URI : /learningMODx/index.php?id=47
Resource : [47]Post a Blog !
Referer :
http://localhost/learningMODx/manager/index.php?a=1&f=tree
User Agent : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
IP : ::1
Benchmarks
MySQL : 0.0050 s (6 Requests)
PHP : 0.0310 s
Total : 0.0360 s
Memory : 1.8697814941406 mb
Backtrace
1 DocumentParser->executeParser()
index.php on line 140
2 DocumentParser->prepareResponse()
manager/includes/document.parser.class.inc.php on line 1568
3 DocumentParser->outputContent()
manager/includes/document.parser.class.inc.php on line 1673
4 DocumentParser->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 582
5 DocumentParser->mergeSettingsContent()
manager/includes/document.parser.class.inc.php on line 1442
6 array_key_exists()
manager/includes/document.parser.class.inc.php on line 884
I cannot figure out what's going on ! Any suggestions ?
Thank you.