Keyword

Why no validate empty title in frontend form?

More
12 years 6 months ago #64042 by Alexx
Hi!
Seems, the problem is only for J!2.5+k2 2.5.5. (May be not...)
In frontend form there is no validation of empty title and category. Result is errorpage 404.

In J! 1.5.25 validation is works fine.

How can I fix that bug?

С уважением, Алексей.

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #64043 by Alexx
Hey! Is that issue is only mine?
If not - then it's a bug! People (and developers), why do you ignore that???

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago - 12 years 6 months ago #64044 by tonis
I have this issue too, same version, same problem, no field validation in frontend when i click "save".

The error occurs only in Mozilla Firefox, instead of showing a warning after cliking "save", an error 404 is shown.

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #64045 by Andrei
Hey,

I'm also experiencing this.
Joomla 2.5.4
K2 2.5.5 (but the problem seems to persist in K2 2.5.6 also)

I'm no javascript guru, but I think the SAVE button calls for a javascript function by not referencing it correctly.
Don't know why this works in Chrome though.

Anyway, here are the steps to fix it:
1. copy
components/com_k2/templates/default/itemform.php
to
templates/YOUR_TEMPLATE_NAME/html/com_k2/default/itemform.php
so you don't work directly on K2 Extension (avoid overwriting at update)

2. open the new file (templates/YOUR_TEMPLATE_NAME/html/com_k2/default/itemform.php)

Locate the save button:
<a class="toolbar" href="#" onclick="javascript: submitbutton('save'); return false;"> .... etc

Add Joomla before the submitbuttion('save') function:
<a class="toolbar" href="#" onclick="javascript: Joomla.submitbutton('save'); return false;">

If you check the same file, the addScriptDeclaration, you'll see that submitbutton is actually a method defined in Joomla object.

I'm a little bit dissapointed that there is no consideration for graceful degradation in most Joomla modules.

Kind regards and best of luck,
Andrei

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #64046 by Hubenour
Whoou,
WORKING FOR ME!
thank you so much Andrei!

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #64047 by tonis
Thanks for the solution ... works for me too

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #64048 by Alexx
Сапсибо, Андрей !
Чтоб ты всегда был здоров. А тот бородатый дядька-автор к2 походу форум вооще не читает.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum