Hi micker,
after hours of debugging, we found the cause of our problem with the upload from the frontend. Maybe this is also the solution for github.com/FLEXIcontent/flexicontent-cck/issues/1199.
Since we had an old, working version of the database and a no longer functioning version of the database, the cause had to be an interim misconfiguration of the system.
Both versions called the upload URL e.g. /index.php?option=com_flexicontent&task=filemanager.uploads&ff82baa73811e4d0a57ee96b9aff0fb1=1&fieldid=19&u_item_id=1021.
The working version correctly routed to the filemanager controller, while the other returned a 403 error in the administrator - items controller.
Since the 'view' was not explicitly passed as a parameter in this URL, the upload scripts automatically added the parameter 'view' with a default value.
The working version used the view "category", while the non-working version used the view "item".The reason for the different determination of the value for the 'view' parameter lies in how JInput attempts to ascertain the missing value. Ultimately, JInput took the value for 'view' from the content associated with the Home menu item. In our case, this had meanwhile changed from a Flexicontent category page to a Flexicontent item page.
By reassigning a Flexicontent category page as the homepage, the upload worked again.
If a single Flexicontent page is used as the homepage, the frontend upload does not work again.
In this case, explicitly passing the 'view' parameter with the value 'category' in the file com_flexicontent/helpers/html/fcuploader.php (line 98:99) helps.
change from
Code:
'action' => JUri::base(true) . '/index.php?option=com_flexicontent&task=filemanager.uploads' . '&'.JSession::getFormToken().'=1' . '&fieldid='.($field ? $field->id : ''). '&u_item_id='.$u_item_id,
to
Code:
'action' => JUri::base(true) . '/index.php?option=com_flexicontent&task=filemanager.uploads&view=category' . '&'.JSession::getFormToken().'=1' . '&fieldid='.($field ? $field->id : ''). '&u_item_id='.$u_item_id,
Final questions: Why don't the other 'view' options work, and what happens if a different component is used as the homepage?
Regards
McMurdok