Giorgi625 VIP
Total posts: 655
10 Фев 2018 10:00

Check here module with title Ultimas empresas registradas is Cobalt module Records.

There is new record in Cobalt with title "Mutua LALALAND" which is not displayed in module. why? It does not display even on default template. but display if I increase records number so it seems that problem is with "Primary order" feature in module.

Module is set to show featured records first and then by most recent.

On Section page it is displayed correctly check here it seems problem with module.

Последние изменения: 04 Апр 2018


Sergey
Total posts: 13,748
12 Фев 2018 10:55

And Mutua LALALAND is featured?


Giorgi625 VIP
Total posts: 655
14 Фев 2018 10:14

Sergey And Mutua LALALAND is featured?

No it is not featured. It shoud be displayed after featured records.

It seems my client has locked site, I will upload backup on test subdomain and show you.


Giorgi625 VIP
Total posts: 655
16 Фев 2018 09:57

So here is Demo

I have created in this demo "Test record" which is on this page . It is normal for this record to be in last positions because in Section homepage is set to show alphabeticaly.

But on homepage there is Cobalt records module which is set to show most recent records and that "Test record" must be right after records which have red badge "recomendado".

New records will only appear on homepage if I will add it to featured and then remove from featured for example you can check record with title "Was once featured". This record did not appeared on homepage at first like "test record" but I featured it from backend and then removed feature and it is now right after featured records.

If "Featured first" feature is disabled in Section parameters ordering works properly


Sergey
Total posts: 13,748
04 Март 2018 14:12

Enable dubg mode for demo I'll look into queries.


Giorgi625 VIP
Total posts: 655
04 Март 2018 14:15

Enabled debug and error reporting also set to maximum.


Sergey
Total posts: 13,748
05 Март 2018 05:02

Here is SQL query that is run on module. I've found it in debug report.

SELECT r.*,0 as `new`

  FROM josck_js_res_record AS r

  WHERE r.section_id = 1 
  AND r.ctime < '2018-03-05 04:58:50' 
  AND (r.extime = '0000-00-00 00:00:00' OR r.extime > '2018-03-05 04:58:50') 
  AND r.parent_id = 0 
  AND r.published = 1 
  AND r.type_id IN (1)

  ORDER BY r.featured DESC, r.ftime DESC,r.ctime DESC 
  LIMIT 8

What I can see you have enebled featured first. that is why other articles goes first. Or or order is r.ftime DESC,r.ctime DESC. This means that first it orders by the time article become featured and only then by creation time.


Giorgi625 VIP
Total posts: 655
05 Март 2018 11:43

Yes first module must display featured. That is right and then it must display most recent records, but it does not do so.

So let me explain with images. Image-1 below is for Cobalt records module. Record 1 and 2 are featured and they are on correct places in ordering.

Then it comes record 3 (with title "Was once feature" and fox image). First when I added this record, it was not displayed in this list of records, it showed up only after I featured it and then unfeatured.

Record 4 (Sia services) was also once featured and unfeatured. It also did not showed up at first, but at it's craetion time both records were most recent.

Image-1

Image-1

But on a place of Record 4 there should be another record with title "Test Record" and Girls image with bear bottle(mark by "Real 4"). Which is shown on Image-2 (but on this image this record is latest because of alphabetical ordering, this is Mapa page on that site, which is section list type page).

Image-2

Image-2

You can see why this record with Girl image should be on place 4 in Image-3 where you can see creation time of records.

Image-3

Image-3

In that image-3 I also marked records which are not featured with numbers. This numbers display which ordering they must have in module because of creation time.

Now I also noticed another problem. Not in module but in section list page (Look at image-4) AS records "Was once featured" and "Sia services" are not now featured (but were featured before only for a few minutes) are displayed right after featured records, when I have set alphabetical ordering and they must be displayed in last positions. "Sia services" should be before "Test record" and "Was once featured" should be after "Test record"

So as I guess it allows ordering by " r.ftime DESC " also for records which are not currently featured. Is this how it should work?

Image-4

Image-4

So displaying featured first is ok, but after this ordering is not correct not in module not in section root. Why?

PS. You can answer me on a Russian if you prefer. I understand Russian better then English, but I make mistakes when typing on a Russian, so prefer to type on English.


Giorgi625 VIP
Total posts: 655
05 Март 2018 13:37

I created test installation of clean Joomla here

You can see on top there is module, set to show featured first and most recent then. Below is section set to featured first and then title alphabetical.

As you can see it works fine.

Then I created new page on my main site with protostar and Cobalt default list template for module(like it is on first link). On this page problem still exists. You can see it in image below: Protostar + default template

As image displays "Test record" must be 4th in a row because of its creation date.

I think to delete old records on site with ordering problems and create new records to see what happens but first I will to wait for your answer.

About Notice: undefined offset in protostar page on this page I don;'t understand what it is but this problem is not on this page but both use exactly same template, I compared files and they match each other.


Sergey
Total posts: 13,748
04 Апр 2018 11:36

This is very weired behaviour. Try to run optimize and repair on your DB tables. May be something there. Because SQL query looks correct.

Giorgi625 About Notice: undefined offset in protostar page on this page I don;'t understand what it is but this problem is not on this page but both use exactly same template, I compared files and they match each other.

This error is conected to exclude fields parameter of default template.

Работает на Cobalt