Bonjour, quelqu'un pourrait-il m'expliquer d'où viens le problème d’accès suivant. Pour un ajout de commentaire.
dans mon tmpl/item.php
fait appel a un form.add.xml
Or, lors de la validation j'ai systématiquement un code erreur 403 problème de droit. Cela fonctionne uniquement en connexion administrator. Comment le rendre validable en registred ?
dans mon tmpl/item.php
if (JFactory::getUser()->id && $params->get('comments')) : ; ?>
<a href="index.php?option=com_nglibrary&view=Comments &layout=add&task=add&tmpl=component&render_tool bar =1&nglibrary_book_id=<?php echo $this->getModel()->getId(); ?>"
class="btn btn-default jb-modal"><i class="icon icon-new"> </i> <?php echo JText::_('ADD_A_REVIEW'); ?></a>
<?php
endif;
<a href="index.php?option=com_nglibrary&view=Comments &layout=add&task=add&tmpl=component&render_tool bar =1&nglibrary_book_id=<?php echo $this->getModel()->getId(); ?>"
class="btn btn-default jb-modal"><i class="icon icon-new"> </i> <?php echo JText::_('ADD_A_REVIEW'); ?></a>
<?php
endif;
<?xml version="1.0" encoding="utf-8"?>
<form
type="form"
cssfiles="media://com_nglibrary/css/book.css"
>
<fieldset name="basic_fieldset" class="span5">
<field name="nglibrary_book_id" type="Bookid" emptylabel="1" />
<field name="created_by" type="User"
show_username="false"
show_name="true"
readonly="readonly"
/>
<field name="nglibrary_book_title" type="Bookid" emptylabel="1" />
<field name="title" type="Text" required='required'/>
<field name="message" type="TextArea" required='required'/>
<field labelclass="alert alert-info" name="info" type="note" />
</fieldset>
<fieldset name="ratio_fieldset" class="span6">
<field name="rate" type="Radio" required='required'>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</field>
</fieldset>
</form>
<form
type="form"
cssfiles="media://com_nglibrary/css/book.css"
>
<fieldset name="basic_fieldset" class="span5">
<field name="nglibrary_book_id" type="Bookid" emptylabel="1" />
<field name="created_by" type="User"
show_username="false"
show_name="true"
readonly="readonly"
/>
<field name="nglibrary_book_title" type="Bookid" emptylabel="1" />
<field name="title" type="Text" required='required'/>
<field name="message" type="TextArea" required='required'/>
<field labelclass="alert alert-info" name="info" type="note" />
</fieldset>
<fieldset name="ratio_fieldset" class="span6">
<field name="rate" type="Radio" required='required'>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</field>
</fieldset>
</form>