1

I have an error regarding an homemade component for editing articles in frontend. It allows to view the content history of the edited article. In the tmpl directory of the homemade component I use :

 echo $this->form->getInput('contenthistory'); 

The generated code (source code) is :

button class="btn modal_5297" rel="{handler: 'iframe', size: {x: 800, y: 500}}" 
href="/joomla362/index.php/component/contenthistory/?view=history&layout=modal
&tmpl=component&field=jform_contenthistory&item_id=5297&type_id=1
&type_alias=com_content.article&9b8f00e58db415cdfa015fe5da392cb4=1" title="Versions">

The error exist with Joomla!3.6.2 but not with Joomla!3.4.8. If I open a window with the complete URL

http://my-server-ip/joomla362/index.php/component/contenthistory/?view=history
&layout=modal&tmpl=component&field=jform_contenthistory&item_id=5297&type_id=1
&type_alias=com_content.article&9b8f00e58db415cdfa015fe5da392cb4=1" title="Versions"

It give me the content history of the article. I saw that source code changes somehow between Joomla!3.4.8 and Joomla!3.6.2 but I am not able to adapt myself. Can someone tell me the good way to see content history in frontend ? Thanks for help.

1 Answer 1

0

I found a way to fix this problem by adding the line

JHtml::('behavior.modal');
Before I used the line
JHtml::('behavior.modal', 'a.modal_jform_contenthistory');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.