w3c validation fix for the form block
Permalink 1 user found helpful
I'm working on a fix for the Form block, which I am using on a page I ran through the w3c validator. It says:
----
# Error Line 70, Column 161: general entity "ccm_token" not defined and no default entity
…?cID=65&bID=551&arHandle=Main&ccm_token=1276472691:50e727814f7d91f984c…
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text.
----
Specifically, I believe it's this snippet in lines 46-47 of /concrete/blocks/form/controller.php:
I've created a new controller.php to over-ride the core code file, located in /blocks/form, with changes I thought would fix the ampersands. The problem is, no matter what I do, the changes do not appear in the page.
:-/
I'm sure I'm overlooking something embarrassingly obvious, but I would really appreciate another pair of eyes on this...
Thanks,
Kate
----
# Error Line 70, Column 161: general entity "ccm_token" not defined and no default entity
…?cID=65&bID=551&arHandle=Main&ccm_token=1276472691:50e727814f7d91f984c…
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text.
----
Specifically, I believe it's this snippet in lines 46-47 of /concrete/blocks/form/controller.php:
$pURI = ($_REQUEST['pURI']) ? $_REQUEST['pURI'] : str_replace(array('&ccm_token='.$_REQUEST['ccm_token'],'&btask=passthru','&method=submit_form'),'',$_SERVER['REQUEST_URI']);
I've created a new controller.php to over-ride the core code file, located in /blocks/form, with changes I thought would fix the ampersands. The problem is, no matter what I do, the changes do not appear in the page.
:-/
I'm sure I'm overlooking something embarrassingly obvious, but I would really appreciate another pair of eyes on this...
Thanks,
Kate
just started a thread about this same topic... sorry, I didn't catch this one... I'm at the same place... you ever get anywhere on this issue?
just started a thread about this same topic... sorry, I didn't catch this one... I'm at the same place... you ever get anywhere on this issue?
After 3 hours, I just decided to move on and come back to it later. The funny thing is, one of the ampersands I replaced with "&" actually did show up as "&" in the page source. The other two didn't. That popped a few synapses, heheh!
Okay, after playing around way too much, I think I may have found it... I'm no programmer, so someone much smarter than I will have to verify it doesn't screw anything else up... but here's what I changed:
concrete/models/block.php line 611 - change & to &
concrete/libraries/block_view.php line 72 - change & to &
be sure to let me know if this really works or not, thanks
concrete/models/block.php line 611 - change & to &
concrete/libraries/block_view.php line 72 - change & to &
be sure to let me know if this really works or not, thanks
...but thanks for trying to help j. I've been playing with block development, and getting more familiar with the codebase all the time, so one day soon I will feel up to tackling this problem again.
I had the same problem and changing them worked for me!
The line is now on 656 in the models/block not checked in the dev version but this still exists if using an external form.
And still on line 72 in block view
Once all changed everything validates.
also to anyone else attempting this make sure you copy the files into your root don't edit the files in the concrete folder, that way if its not fixed in the next version you wont lose your changes.
And still on line 72 in block view
Once all changed everything validates.
also to anyone else attempting this make sure you copy the files into your root don't edit the files in the concrete folder, that way if its not fixed in the next version you wont lose your changes.