Page 1 of 1
1.11 and news fesubmit not working correctly
Posted: Sun Jul 29, 2012 1:51 pm
by cb2004
1.11 is a superb release. Upgrade went smoothly on my first site. There are a couple of problems with the frontend submit of news however. There are no errors if title and content are not filled in. Also if title or content is filled in but the other is not and the form is submitted, the value disappears.
Other than that, extremely impressive release.
Re: 1.11 and news fesubmit not working correctly
Posted: Sun Jul 29, 2012 2:01 pm
by calguy1000
I don't think this is new behavior. The fesubmit action did not get any significant attention during the 1.11 development cycle. Only a few references were cleaned up.
Re: 1.11 and news fesubmit not working correctly
Posted: Sun Jul 29, 2012 2:28 pm
by cb2004
It is behaving differently in a few places.
Code: Select all
{if isset($error)}
<h3><font color="red">{$error}</font></h3>
{else}
{if isset($message)}
<h3>{$message}</h3>
{/if}
{/if}
This used to throw errors. The values input in the title and description boxes was held if an error was thrown.
Also in my template I have:
Code: Select all
<input type="text" name="mbcd7fnews_customfield_3" id="mbcd7fnews_customfield_3" value="{$smarty.post.mbcd7fnews_customfield_3}" />
Which used to hold the values of the custom fields. This is also now not working. Could this all be to do with the module now being cachable?
Re: 1.11 and news fesubmit not working correctly
Posted: Sun Jul 29, 2012 3:13 pm
by cb2004
Also if somebody tries to upload a file extension that is not supported, the form is not submitted, the form is cleared and no error is given anymore. If only I would of tested a production site with 1.11 on a test environment I would of spotted this for you as I use it a lot on various sites. Apologies.
Re: 1.11 and news fesubmit not working correctly
Posted: Sun Jul 29, 2012 3:18 pm
by calguy1000
I just looked at the logs of the fesubmit action changes. Analyzed the code, and looked at the diffs between versions (and the blame log).
This file was trivially modified in 2012 to change a bunch of =& to = statements. That's the only change for 2012. Therefore the behavior your seeing is NOT new to CMSMS 1.11 (or even 1.10).
Next: On successful submit the system will redirect to the current content page. No message or error will be displayed. This may not be ideal, may not be correct, but it is not new (those changes go back to 2008).
Re: 1.11 and news fesubmit not working correctly
Posted: Sun Jul 29, 2012 3:39 pm
by cb2004
To fix this bug change the form template error line at the top from:
To:
Code: Select all
{if isset($error) && $error != ''}
Re: 1.11 and news fesubmit not working correctly
Posted: Mon Jul 30, 2012 7:33 am
by cb2004
On further testing this didn't fix it. If you put {get_template_vars} in the form template then the $error will appear in the printout, i.e. No Content Given if you don't fill anything in, however it is just not appearing. Going back to 1.10.3 for now as that version of news worked ok.
Re: 1.11 and news fesubmit not working correctly
Posted: Mon Jul 30, 2012 10:35 am
by Jos
Editing files should
NOT be the solution.
How about adding the nocache parameter to the modulecall like this?
{News nocache}
As described here (near the bottom of the page)
http://docs.cmsmadesimple.org/general-i ... g-in-cmsms
Re: 1.11 and news fesubmit not working correctly
Posted: Mon Jul 30, 2012 10:44 am
by cb2004
I tried {news action='fesubmit' nocache} but no joy. Editing the module file was the only solution I could come up with in the limited time I had to fix a site. I am guessing in 1.11.1 it will need to be fixed so it doesn't cache.