? ? Success

User tests: Successful: Unsuccessful:

avatar phproberto
phproberto
12 Nov 2015

Description

This changes the JFormField to:

  • Add a new render() function that can be used to render layouts inside other layouts.
  • Allow to easily override the layout include paths in any child field creating an override of the getLayoutPaths() method.

Render layouts inside other layouts is used like:

<a href="http://joomla.org">Joomla</a>
<?php 
    // Render `sample.layout` layout inside this layout
    echo $field->render('sample.layout', $displayData);
?>
<p>Another paragraph</p>

You can see below how I used it to render a common stats layout that is renderer in both message and field.data layouts.

This PR also improves the statistics system plugin:

  • Changed plugin fields prefix to plgsystemstats to avoid conflicts with any extension using stats prefix. Before: type="stats.uniqueid" after: type="plgsystemstats.uniqueid"
  • Remove uniqueid field getInput() method and use the fields layout system so 100% of the plugin output is overridable.
  • Create new field data that will be used to render the stats that are going to be sent in the plugin settings view.

stats-params-data

How to test

  1. This changes the field layout system so you should test that fields that are currently using layouts work as expected. The only fields using it are JFormFieldRadio & JFormFieldCheckboxes so the best way to check is to edit the codemirror plugin that includes both fields in its settings.
  2. Enable debug in statistics system plugin and test that the message selecting the user to configure statistics mode is shown. Also confirm that when you click in Click here to see which information will be sent. data is shown below.
  3. Go to statistics system plugin settings and confirm that when you click in Click here to see which information will be sent. data appears below.
avatar phproberto phproberto - open - 12 Nov 2015
avatar phproberto phproberto - change - 12 Nov 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Nov 2015
Labels Added: ?
avatar phproberto phproberto - change - 12 Nov 2015
The description was changed
avatar joomla-cms-bot joomla-cms-bot - change - 12 Nov 2015
Labels Added: ?
avatar phproberto
phproberto - comment - 12 Nov 2015

I have also cleaned versions & added a language string for each data sent

version-cleaned

avatar zero-24 zero-24 - change - 12 Nov 2015
Milestone Added:
avatar brianteeman brianteeman - test_item - 12 Nov 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 Nov 2015

I have tested this item :white_check_mark: successfully on 4dff4a2

Great stuff - works as described


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar brianteeman brianteeman - change - 12 Nov 2015
Category Plugins
avatar brianteeman brianteeman - change - 12 Nov 2015
Labels
avatar phproberto phproberto - change - 19 Nov 2015
Labels
avatar joomla-cms-bot
joomla-cms-bot - comment - 19 Nov 2015

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar phproberto
phproberto - comment - 19 Nov 2015

I have updated the PR and added an extra check that will show the error message from the stats server if something when wrong (like data validation).

avatar zero-24 zero-24 - change - 25 Nov 2015
Labels
Easy No Yes
avatar roland-d roland-d - test_item - 25 Nov 2015 - Tested successfully
avatar roland-d
roland-d - comment - 25 Nov 2015

I have tested this item :white_check_mark: successfully on e18b20c

Works as described, the statistics plugin data is shown. The settings in CodeMirror keep working as they did before.

@phproberto This is more than just a statistics plugin improvement if I understand it correctly. You also changed the way JLayouts work by adding the getLayoutPaths() method by which form fields can override the list of paths to check the layout files. In the uniqueid.php and data.php we get duplicate code but I guess that can't be prevented the way it is setup now.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar joomla-cms-bot
joomla-cms-bot - comment - 26 Nov 2015

This PR has received new commits.

CC: @brianteeman, @roland-d


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar phproberto
phproberto - comment - 26 Nov 2015

I have updated the PR and added some changes:

  • Avoid to make public getRenderer() methods in JFormField as suggested by @wilsonge and create a new public method called render(). That method will be used when you want to display a layout inside another field layout.
  • I have created a new base field for the plugin fields to avoid the duplicated code reported by @roland-d
  • I have ensured that the data field only shows/hides the data attached to it.
avatar phproberto
phproberto - comment - 26 Nov 2015

And yes @roland-d I have modified the JFormField because I found that extensions (which is the case of this plugin) need to setup their own layout paths for fields.

avatar infograf768
infograf768 - comment - 3 Dec 2015

Tested OK for codemirror and stats message.
Concerning that one I suggest to add some <p> in the layout as the link is not very visible on the blue back-ground.
Instead of
screen shot 2015-12-03 at 12 17 29
we would get
screen shot 2015-12-03 at 12 21 33

avatar Gerlof
Gerlof - comment - 8 Dec 2015

Am I right that this PR cannot be tested using Joomla! Patch Tester?
Clicking [Apply Patch] shows message "The file marked for modification does not exist: plugins/system/stats/layouts/message.php"

avatar Bakual
Bakual - comment - 8 Dec 2015

@gerlof You need to test this on staging. 3.5.0-beta may not work.

avatar Gerlof
Gerlof - comment - 8 Dec 2015

@Bakual Joomla! Update shows

"You are on the "Testing" update channel. This channel is designed for testing new releases and fixes in Joomla.
It is only intended for JBS (Joomla! Bug Squadâ„¢) members and others within the Joomla community who are testing. Do not use this setting on a production site.
You already have the latest Joomla version, 3.5.6-dev."

How to change "3.5.6.-dev" into the right version? I think I have to change a setting in a db table, but which one to pick? ;)

avatar Bakual
Bakual - comment - 8 Dec 2015

I have no clue how you got onto a 3.5.6-dev. That version doesn't exist.
I would just set up a new Joomla instance instead of trying to fix a broken one.

For staging, you can download https://github.com/joomla/joomla-cms/archive/staging.zip and install from that.

avatar Gerlof
Gerlof - comment - 8 Dec 2015

@Bakual Yes, strange, isn't it? This happened after installing 3.5 Beta.

avatar Gerlof
Gerlof - comment - 8 Dec 2015

@Bakual Note: wrong version number was caused by the file libraries/cms/version/version.php, from line 35:

/**
* Maintenance version.
*
* @var string
* @since 3.5
*/
const DEV_LEVEL = '6-dev';

avatar Bakual
Bakual - comment - 8 Dec 2015

Ah. @mbabker fixed that: 5a20901

avatar joomla-cms-bot
joomla-cms-bot - comment - 9 Jan 2016

This PR has received new commits.

CC: @brianteeman, @roland-d


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar phproberto
phproberto - comment - 9 Jan 2016

Updated copyrights to 2016

avatar infograf768
infograf768 - comment - 10 Jan 2016

Any reason for using
+ * @var boolean $spellchec Spellcheck state for the form field.
instead of
+ * @var boolean $spellcheck Spellcheck state for the form field.
?

avatar dgt41
dgt41 - comment - 10 Jan 2016

@infograf768 the way the vars get populated for the layout is by calling the parent class field and then merge any other, specific vars for the field. So this comment block is, for the most of it, generic...
Check https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/fields/checkboxes.php#L150-L167
and
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/field.php#L952-L990

avatar Fedik
Fedik - comment - 10 Jan 2016

@dgt41 I think @infograf768 mean $spellchec vs $spellcheck :wink:

avatar dgt41
dgt41 - comment - 10 Jan 2016

@Fedik oops, that's a typo

avatar joomla-cms-bot
joomla-cms-bot - comment - 28 Jan 2016

This PR has received new commits.

CC: @brianteeman, @roland-d


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar phproberto
phproberto - comment - 28 Jan 2016

Updated again. Please if this is not going to be merged save us time and close it.

avatar andrepereiradasilva
andrepereiradasilva - comment - 28 Jan 2016
avatar infograf768 infograf768 - test_item - 29 Jan 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 29 Jan 2016

I have tested this item :white_check_mark: successfully on 7fb97f4

One more tester needed.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar Fedik
Fedik - comment - 29 Jan 2016

all works if follow the test instruction :wink:

However I noticed issue, but not sure if it related to changes made in current pull request.
When in the request permission I chose "allow" all work fine. But when I chose "once" or "never" then the request permission message annoying me after each page refresh.

upd: seems it not because changes in current pull request, it something old

avatar Gerlof Gerlof - test_item - 29 Jan 2016 - Tested successfully
avatar Gerlof
Gerlof - comment - 29 Jan 2016

I have tested this item :white_check_mark: successfully on 7fb97f4


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar MATsxm MATsxm - test_item - 29 Jan 2016 - Tested successfully
avatar MATsxm
MATsxm - comment - 29 Jan 2016

I have tested this item :white_check_mark: successfully on 7fb97f4

tested again - all fine here
Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8386.

avatar wilsonge wilsonge - change - 29 Jan 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-01-29 12:42:27
Closed_By wilsonge

Add a Comment

Login with GitHub to post a comment