?
avatar rainerangermeier
rainerangermeier
2 Dec 2014

Steps to reproduce the issue

  1. Install the Plugin - Awailable on GitHub (https://github.com/rainerangermeier/joomla_issues/blob/master/plugins/menuitemlogo.zip)
  2. Enable the Plugin in the Extensions/Plugin Manager (name = plg_menuitemlogo)
  3. Open some menu Item in the Menu Manager
  4. Select Tab "Custom Params"
  5. Select some image from the image folder of your Joomla installation
  6. Hit save

Expected result

A new "logo" variable was added to the menu item's params column (table #__menu) - having the value of the image path you selected. (image path stored in params column)

The image path should be displayed in the Custom Params / Logo Image media field, when you open the menu item.

Actual result

The logo parameter is not being saved in the database.
The image path is not being displayed in the Custom Params / Logo Image media field.

System information (as much as possible)

XAMPP Control Panel v3.2.1
PHP: 5.5.6
MySQL: 5.6.14
OS: Windows 8.1 Professional
Joomla: 3.3.6

Additional comments

I followed the tutorial for "Adding custom fields to core components using a plugin"
http://docs.joomla.org/Adding_custom_fields_to_core_components_using_a_plugin "Adding custom fields to core components using a plugin

This tutorial works perfectly, but not when I am trying to adapt it for com_menus.item component.

There is already a StackOverflow Question that explains all of this:

http://stackoverflow.com/questions/25832262/joomla-3-3-adding-custom-fields-to-all-menu-items-via-plugin-params-not-save

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar rainerangermeier rainerangermeier - open - 2 Dec 2014
avatar big-wave-tim
big-wave-tim - comment - 3 Dec 2014

Hi

I think this maybe a problem with how you implemented your plugin rather than Joomla! itself.

Perhaps have a look at plugins/user/profile as I know this saves additional info into the database.

I think your plugin only has the code to show a custom field and lacks code to act upon anything that the user adds to the field. specifically I think you need to do more than override onContentPrepareForm you need to tell Joomla! what to do when the form is saved to.

avatar Hackwar
Hackwar - comment - 4 Dec 2014

That is indeed an issue of your plugin. You are correctly extending the form with that event and that is enough to save it also in the params field in the database, but you are checking against the request parameters and expect it to be a view. When saving the data, there is no view request parameter, instead its done via task=item.save. That said, the request parameters are not reliable for that check. Instead please check against the name of the form. This is not a Joomla bug. Closing.

avatar jissues-bot jissues-bot - close - 4 Dec 2014
avatar Hackwar Hackwar - change - 4 Dec 2014
Status New Closed
avatar jissues-bot
jissues-bot - comment - 4 Dec 2014

Set to "closed" on behalf of @Hackwar by The JTracker Application at issues.joomla.org/joomla-cms/5289

avatar jissues-bot jissues-bot - close - 4 Dec 2014
avatar zero-24 zero-24 - close - 4 Dec 2014
avatar jissues-bot jissues-bot - change - 4 Dec 2014
Closed_Date 0000-00-00 00:00:00 2014-12-04 10:16:41
avatar aaronhudon
aaronhudon - comment - 23 Feb 2015

Can someone please describe what is required to make this work. I have also encountered this issue, and from what I have traced, the method "findFieldsByGroup" in JForm throws out xml nodes that are added at runtime.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5289.
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment