Custom Order not working

More
6 years 8 months ago - 6 years 8 months ago #68631 by ggppdk
Replied by ggppdk on topic Custom Order not working
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...
Last edit: 6 years 8 months ago by ggppdk.

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

More
6 years 8 months ago #68632 by lomuyeh
Replied by lomuyeh on topic Custom Order not working
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.

More
6 years 8 months ago #68633 by ggppdk
Replied by ggppdk on topic Custom Order not working
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...

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

More
6 years 8 months ago #68634 by lomuyeh
Replied by lomuyeh on topic Custom Order not working
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.

More
6 years 8 months ago #68635 by lomuyeh
Replied by lomuyeh on topic Custom Order not working
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.

More
6 years 8 months ago #68636 by ggppdk
Replied by ggppdk on topic Custom Order not working
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...
The following user(s) said Thank You: lomuyeh

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.301 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline