[Typo3-dev] Problems submitting a form in a self developed extension
Dmitry Dulepov
typo3 at fm-world.ru
Wed Aug 24 08:45:07 CEST 2005
Hi!
> i've tried to set the plugin as USER_INT with the following code:
Code looks perfectly ok. One thing I forgot to mention is that you may
need to "clear all cache" and "clear temp_CACHED" in the BE. You really
need both!
> but the error still remains. But one different thing i saw in the
> backend was if the plugin is a USER-Object the sended mails will stay
> on the backend-site as stupid not very useful records with some
> fields. If i change the Plugin to USER_INT, these records will not be
> stored in the backend-site.
Well, no idea about this yet. Will see in the future.
> But after all the form will not show the success-message for sending
> the mails. Also the mails will not be send to my testing account.
> After all it seems that the page does only a simple reload.
Let's do the following tests. You must be logged off from the BE while
doing them.
Test A:
=======
1. insert "echo time();" in the very beginning of your
tx_cmsseminar_pi1->main
2. add <input type="hidden" name="no_cache" value="1" /> to your form
3. open the page with this plugin appending ?&no_cache=1 to the page URL
3a. You should now see a sequence of digits at the very top of the page.
Write them down (copy to Notepad, for example)
4. submit the form. You should see digits again. Compare them to those
you saved: they must be different. If they are, then your plugin is
executed. If they are not, take a look to TS object browser and see if
plugin is really USER_INT.
Test B:
========
1. Remove "no_cache" entry in the form and "echo time();" in the main
function.
2. The very last line of your "main" function probably looks like this:
return $this->pi_wrapInBaseClass($content);
change it to:
return time() . '<br />' $this->pi_wrapInBaseClass($content);
3. Call the page and note the number that appears before the plugin output.
4. Submit the form and compare the number as in step 4 for test A.
Then we will see.
> Would it be helpful if i post the code of the class?
Not yet.
> Or do i have to
> change something else in TypoScript to make the plugin work?
No, USER_INT should do...
Dmitry.
More information about the TYPO3-dev
mailing list