×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Some bugs in the comment form

Some bugs in the comment form 10 years 2 months ago #27653

  • Poul Theodorsen
  • Poul Theodorsen's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I have made it mandatory that user must enter his name before commenting.
But if user clicks on "Anonymous" above the name field and then click the Send button, the comment is submitted - without the mandatory name.

Also

What is the idea of the Cancel button? If think that users will feel uncanny, because after cancelling the form, it still remembers your info.
It ought to work exactly as a usual Clear button - that's clearing everything for good.

And

Probably related to the above, even though I have Cleared the form, attempted to send it as an empty form and reloading the page, for some strange reason, the email field is always prefilled with the letter "i" instead of "Enter your email". The "i" in this case is probably coming from the first letter in a previously entered email adr

Another thing puzzles me: why is the "Cite" button publicly visible, when setting is that only administrators can reply? It is of no use to the public.

Some bugs in the comment form 10 years 2 months ago #27672

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Poul,
1. Okay, I've put this on the todo list for fixing

2. The cancel button. Well, we can make it clear the form, but I thought - what If I accidentally click it. I don't want to lose all the data. So having it close the form, but keep the text makes sure that if I decide otherwise I can still post the comment.
3. The email and name are stored in a cookie and it starts to save it when you enter the first character. If you have less than 1 characters it doesn't do anything.

4. With "cite" button I guess that you mean quote. Quote is different from reply. You can set the reply to be available only to administrators, but there is no option to hide the quote button. If you don't want it you'll have to make a template override and remove the button.

Regards,
Daniel

Some bugs in the comment form 10 years 2 months ago #27714

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
1. Actually this should be already fixed in the last dev. release. Can you try it out?
Alternatively you could do the following modifications:
Go to \components\com_comment\templates\default\default_form.php
line 155 looks like this:
<button class="btn-link btn-small ccomment-posting-as">{{user.getDefaultName}}</button>

add type="button" to it like this:
<button type="button" class="btn-link btn-small ccomment-posting-as">{{user.getDefaultName}}</button>
 

Then you need to do the same for the cancel button on line 250:
<button class="btn ccomment-cancel"><?php echo JText::_('COM_COMMENT_CANCEL'); ?></button>
change it to
<button type="button" class="btn ccomment-cancel"><?php echo JText::_('COM_COMMENT_CANCEL'); ?></button>

Cheers,
Daniel
  • Page:
  • 1
Time to create page: 0.143 seconds