I have Revolution 2.1.1-pl installed on a hosted machine.
I’m making progress in setting up the site I want to use MODx for, but I’m having difficulty with Template Variables.
I’ve created a few, and some work as expected, but others don’t allow me to enter any content in them.
For example:
I’ve just created a Template variable called iframecontent. It’s to hold the URL for an embedded Google map, so I’ve set it up as Input Type URL, and Output Type URL. I’ve granted access to the page template that I want to use it in, and all the other properties are set to their default value (i.e. largely empty).
The Template references the TV thus:
<div style="text-align:center;">
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="[[*iframecontent]]&output=embed"></iframe><br /><small>View <a href="[[*iframecontent]]&source=embed" style="color:#0000FF;text-align:left">location</a> in a larger map</small></div>
My problem is that when I edit a document which has this template, and enter a value in the TV, MODx Manager will not save the page. If I edit any other part of the document, including the standard content field, it saves just fine.
I can see using Firebug in Firefox that I am getting a 404 error from /connectors/resource/index.php. However a save from the page without entering a value for the TV results in a 200 status from the same page.
This is the data from the successful post:
id 4
template 4
published 1
pagetitle Contact Us
longtitle
description
alias contactus
link_attributes
introtext
parent-cmb
parent 0
parent-original 0
menutitle
menuindex 1
hidemenu 0
type document
context_key web
content <p>[removed]</p>
create-resource-token
isfolder 0
richtext 1
publishedon 2011-05-31 22:30:00
pub_date
unpub_date
searchable 1
cacheable 1
syncsite 1
deleted 0
content_type 1
content_dispo 0
class_key modDocument
uri_override 0
uri contactus.html
tvs 1
tv6_prefix --
tv6
ext-comp-1031 20
ta <p>[removed]</p>
action update
modx-ab-stay
resource_groups {}
HTTP_MODAUTH modx4dee7d5b14fa19.00621213_14dee9cdce28696.77686471
The response that comes back is AJAX:
{"success":true,"message":"","total":0,"data":[],"object":{"id":4,"type":"document","contentType":"text\/html","alias":"contactus","published":true,"pub_date":0,"unpub_date":0,"parent":0,"isfolder":false,"richtext":true,"template":4,"menuindex":1,"searchable":true,"cacheable":true,"createdby":1,"createdon":"2011-05-31 21:20:41","editedby":1,"editedon":"2011-06-07 23:20:20","deleted":false,"deletedon":0,"deletedby":0,"publishedon":"2011-05-31 22:30:00","publishedby":1,"donthit":false,"privateweb":false,"privatemgr":false,"content_dispo":0,"hidemenu":false,"class_key":"modDocument","context_key":"web","content_type":1,"uri":"contactus.html","uri_override":0,"parent-cmb":"","parent-original":"0","create-resource-token":"","syncsite":1,"ext-comp-1031":"20","action":"update","modx-ab-stay":"","resource_groups":"{}","HTTP_MODAUTH":"modx4dee7d5b14fa19.00621213_14dee9cdce28696.77686471","preview_url":"[removed]"}}
This is from the unsuccessful post:
id 4
template 4
published 1
pagetitle Contact Us
longtitle
description
alias contactus
link_attributes
introtext
parent-cmb
parent 0
parent-original 0
menutitle
menuindex 1
hidemenu 0
type document
context_key web
content <p>[removed]</p>
create-resource-token
isfolder 0
richtext 1
publishedon 2011-05-31 22:30:00
pub_date
unpub_date
searchable 1
cacheable 1
syncsite 1
deleted 0
content_type 1
content_dispo 0
class_key modDocument
uri_override 0
uri contactus.html
tvs 1
tv6_prefix http://
tv6
ext-comp-1031 20
ta <p>[removed]</p>
action update
modx-ab-stay
resource_groups {}
HTTP_MODAUTH modx4dee7d5b14fa19.00621213_14dee9cdce28696.77686471
(I know no value is present in tv6, i’ve tried entering various values including none, and all result in the same state)
The response is the 404, followed by the HTML from the homepage of the site. This causes the manager to hang on the "Please Wait... Saving..." message. A refresh of the browser returns me to the previous version of the page.
I have friendly URLs enabled, in case it makes a difference, and the formit, gallery, TinyMCE and Wayfinder packages installed (all latest versions).
I’ve searched Google and these forums and can find no reference to anyone else with the problem, so I’m guessing it’s something to do with my installation (which was done using Softaculous from CPanel from the web hosting company), but I’m stumped as to what to look for. There are no errors in the Manager Actions log, nor in the CPANEL HTTP errors log.
An example of a TV that does work, is an Image type, which I am able to use to refer to images on the server with success.
Would very much appreciate some assistance...
Thanks in advance,
Chris
MODx: 2.1.1-pl
Distribution: Traditional
Server OS: Linux
Version: 2.6.18-238.9.1.el5
PHP: 5.2.14
MySQL: 5.0.92-community
PDO driver for MySQL is installed
Browser: Firefox 4 (Windows 7)