Custom Order not working

8 months 3 weeks ago - 8 months 3 weeks ago #68631 by ggppdk
Hello

2 things

- your testing website had 3.3.0-dev, (so custom field order could have being bogus, because we fixed an issue with it)
i installed v3.2.0-RC2c

- your testing website had the "CUSTOM field ordering" 'Enable' to OFF
i enabled it

so it is working now


Finally it is good to add in the frontend selector override your custom order so that it can be displayed and selected automatically

i am not sure if you had done the above because site is in chinese


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

8 months 3 weeks ago #68632 by lomuyeh
Hi
I still got the problem about custom order in Frontend Overrides.
Because I remember it works in 3.1, so I try to find out what's the difference:

In 3.2:
file: db.php
static function buildItemOrderBy
// 2. If allowing user ordering override, then get ordering from HTTP request variable
$request_order = $app->input->get($request_var.$sfx, '', 'cmd');
$order = $params->get('orderby_override') && $request_order ? $request_order : $order;

$order shows 'custom25intdesc'
The SQL shows 'ORDER BY i.title ASC, i.title ASC'

In 3.1:
file: flexicontent.helper.php
static function buildItemOrderBy
// 2. If allowing user ordering override, then get ordering from HTTP request variable
$order = $params->get('orderby_override') && ($request_order = JRequest::getVar($request_var.$sfx)) ? $request_order : $order;

$order shows 'custom:25:int:desc'
The SQL shows 'ORDER BY f.value_integer DESC, i.title ASC'

This is the difference I found. Seems no ':' in 3.2. Maybe it helps.

Thanks,
Lomu

Please Log in or Create an account to join the conversation.

8 months 3 weeks ago #68633 by ggppdk
Hello

i see,
the frontend order selector is broken, due to filtering

filtering should not be CMD

i am fixing the frontend order selector


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

8 months 3 weeks ago #68634 by lomuyeh
I did some query on JInput.
docs.joomla.org/Retrieving_request_data_using_JInput

When the filter set to 'cmd':

// Allow a-z, 0-9, underscore, dot, dash. Also remove leading dots from result.

Seems it will remove the ':' (%3A) in the $request_var.

I don't know if it's the problem, or maybe some problems of the setting on my sever. I modify 'cmd' to 'string', and the custom order override works.

Hope it helps.

Thanks,
Lomu

Please Log in or Create an account to join the conversation.

8 months 3 weeks ago #68635 by lomuyeh
Sorry for another question.

When I set '25:alpha:desc' in the custom ordering override, this option is not shown.
It works well when I set '25:int:desc'. The option is shown and override is good when select this option.

Any problem about the alpha setting? My field 25 is TEXT, so I think it's not the problem of the field setting.

Thanks,
Lomu

Please Log in or Create an account to join the conversation.

8 months 3 weeks ago #68636 by ggppdk
Hello

We changed filtering to replace
JRequest class that will not exist in J4

so the bug was introduced then

The result of the above is the part "alpha" "int" etc (of frontend order selector) can no longer be detected properly
i have made a fix and i am testing now


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
The following user(s) said Thank You: lomuyeh

Please Log in or Create an account to join the conversation.

8 months 3 weeks ago #68637 by ggppdk
Hello

this is the fixed version that includes fix for frontend orderby selector

github.com/FLEXIcontent/flexicontent-cck/releases/


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!
The following user(s) said Thank You: lomuyeh

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.