modmore / VersionX

Resource & Element Versioning Extra for MODX Revolution (supports 2.2 and up). Extends the core in a future-proof manner to keep copies of every change to resources, templates, template variables, chunks, snippets and plugins.
https://modmore.com/extras/versionx/
40 stars 20 forks source link

Content not showing up #34

Closed jgulledge19 closed 11 years ago

jgulledge19 commented 12 years ago

Not sure if this is a problem in the MODX API or what but I can not get the content to show up on my test page.

Here is where I was able to do a temp fix in versionx/model/versionx.class.php on line 387:

$vArray['content'] = nl2br(htmlentities($vArray['content'])); // this seems to become null after the tojson() 
$vArray['content'] = $vArray['content']; // this worked

This is the content of the resource:

<p>This is just a test page</p>
<div>[<!-- [!testmail] -->]</div>
<hr />
[[!FormIt?
  &hooks=`email`
  &emailLog=`1`
  &emailTpl=`MyEmailChunk`
  &emailSubject=`From the Bethel Website`
  &emailTo=`bethelcollege.edu`
  &validate=`name:required, email:required, details:required:stripTags`
  &emailFrom=`bethelcollege.edu`
  &redirectTo=`17`
  &logCategory=`Contact From`
  &successMessage=`1`
  &successMessagePlaceholder=`mymessage`
]]
[[!+fi.error_message:notempty=`
<p>[[!+fi.error_message]]</p>
<p>`]] 
[[!+mymessage]] [[!+fi.mymessage]]</p>

<form action="[[~[[*id]]]]" method="post">
<h3>Send an e–mail message</h3>
<fieldset><legend><label for="txt">Enter in your question/comment.</label></legend> <textarea id="text" title="Enter in your question/comment." tabindex="1" name="details"></textarea></fieldset><fieldset id="about_you"><legend>About you</legend>
<ul class="text_input">
<li><label for="txt1">Name (first name and last name)</label> <input id="txt1" title="Enter in first &amp; last name." tabindex="2" type="text" name="name" value="[[!+fi.name]]" maxlength="64" /></li>
<li><label for="txt2">Bethel ID</label> <input id="txt2" title="Enter in your Bethel ID." tabindex="3" type="text" name="bethel_id" value="[[!+fi.bethel_id]]" maxlength="16" /></li>
<li><label for="phone">Phone (add area code)</label> <input id="phone" title="Enter in a phone number where you can be reached." tabindex="4" type="text" name="phone" value="[[!+fi.phone]]" maxlength="16" /></li>
<li><label for="txt4">Office/Residence Hall</label> <input id="txt4" title="Enter in your office/residence hall location." tabindex="5" type="text" name="office" value="[[!+fi.office]]" maxlength="128" /></li>
<li><label for="txt5">Address</label> <input id="txt5" title="Enter in your street address." tabindex="6" type="text" name="address" value="[[!+fi.address]]" maxlength="128" /></li>
<li class="city"><label for="txt6">City</label> <input id="txt6" title="Enter in your city." tabindex="7" type="text" name="city" value="[[!+fi.city]]" maxlength="64" /></li>
<li class="state"><label for="txt7">State</label> <input id="txt7" title="Enter in your state." tabindex="8" type="text" name="state" value="[[!+fi.state]]" maxlength="64" /></li>
<li class="zip"><label for="txt8">Zip</label> <input id="txt8" title="Enter in your zip code." tabindex="9" type="text" name="zip" value="[[!+fi.zip]]" maxlength="32" /></li>
<li><label for="txt9">Primary or Bethel e-mail address</label> <input id="txt9" title="Enter in the your Primary or Bethel e-mail address" tabindex="10" type="text" name="email" value="[[!+fi.email]]" maxlength="128" /></li>
<li><label for="txt10">Alternative e-mail address</label> <input id="txt10" title="Enter in an alternative e-mail address" tabindex="11" type="text" name="alternative_email" value="[[!+fi.alternative_email]]" maxlength="128" /></li>
</ul>
</fieldset>
<p class="clear"><input class="submit" title="Submit your Question or Comment" tabindex="12" type="submit" name="submit" value=" Submit Question/Comment " /> <input type="hidden" name="refererURL" value="http://www.bethelcollege.edu/about/map/" /></p>
</form>
Mark-H commented 12 years ago

Possibly related: #33