Hi there
Following a site migration from version 3.10.11 to version 4.2.3 of Joomla, I encounter a problem with the Loadmodule field in the item.php view when I call an RSform type module.
My environment is as follows:
- Flexicontent 4.1.3 (latest version)
- RS Form 3.1.3 (latest version ai,if only for module)
- All my config settings are ok
- Version of php 8.1
Here is the result of my investigations:
The problem comes from the hidden field used in my form to call the "recipient" variable (simple text field id=17), with the code used, which I had found in the Flexicontent support a few years ago.
//<code>
$db = & JFactory::getDBO();
$fcitem_id= JRequest::getInt('id',0);
$field_id=17;
if ($fcitem_id) {
$query = 'SELECT c.title,c.alias,f.value'
.' FROM '.'#'.'__content AS c '
.' LEFT JOIN '.'#'.'__flexicontent_fields_item_relations AS f'
.' ON f.item_id = c.id AND f.field_id='.(int)$field_id
.' WHERE c.id = ' . $fcitem_id;
$db->setQuery($query);
$itemdata = $db->loadObject();
$item_title = $itemdata->title;
}
return $itemdata->value;
//</code>
If I publish this hidden field, then I get the error 0 Class "JRequest" not found.
I don't know how to write php directly, would you have an idea to recover my "recipient" variable?
Thanks in advance for your insight.