Fórum

Asset Publisher 'Order by' not working for custom field

Bernd S, modificado 8 Anos atrás.

Asset Publisher 'Order by' not working for custom field

Junior Member Postagens: 59 Data de Entrada: 31/03/15 Postagens Recentes
Hello,

I created a new web content structure and template. This structure contains a textfield "sort" which allows the user to enter a number for ordering purposes (e.g. 1<2<3...). With that I created 9 different webcontents and gave them "sort" values from 1 to 9. My next step was to add an asset publisher to an empty page and to configure it's "Order by" option to my custom field "sort". Unfortunately the publisher doesn't really care, the contents get ordered by "modified date" or anything else but definitely not by the selected value.

What did I do wrong? Is it working for anyone at all?

Best Regards,
bernd
thumbnail
Julien Mourad, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Junior Member Postagens: 78 Data de Entrada: 22/01/15 Postagens Recentes
There's simply no relation between the asset publisher and your custom fields (out of the box). To accomplish what you want to do, you can create an Application Display Template for your asset publisher, read the custom field value and sort accordingly.
thumbnail
James Falkner, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Legend Postagens: 1399 Data de Entrada: 17/09/10 Postagens Recentes
Which version of Liferay? This was a bug that was fixed in 6.2 CE GA5. If you're not using that version, you'll need to upgrade to 6.2 CE GA5 or later (GA6 is the latest).

The only workaround is what Julien suggested.
Bernd S, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Junior Member Postagens: 59 Data de Entrada: 31/03/15 Postagens Recentes
Thank you for your answers.

I am using 6.2 GA4 at the moment. Read about similar problems in previous versions and therefor thought it was already fixed.
I will try to update and report back after that.

Kind Regards,
Bernd
Klaus Bachmaier, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Regular Member Postagens: 223 Data de Entrada: 30/09/13 Postagens Recentes
I have a very similar Problem, and it's obviously not fixed yet. I'm using LR EE 6.2 SP14. I've build a structure, a template and an ADT for Asset Publisher. The structure has a Date Field which I also use in my ADT, so the Field is shown in the select box of the Order-By Fields in the Asset Publisher. But sorting the Articles by my custom Date Field won't work at all. Any Solution on how to sort Articles in an Asset Publisher by a custom Date Field from the Structure/ADT?
thumbnail
Juan Gonzalez, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Hi Klaus,

this is a known bug: https://issues.liferay.com/browse/LPS-60259.

It is fixed since portal-94-6210 fixpack, you can try installing it. Remember to reindex your structure afterwards so right ordering will take place.

Thanks.
Klaus Bachmaier, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Regular Member Postagens: 223 Data de Entrada: 30/09/13 Postagens Recentes
Hi Juan,

yes thanks! I wasn't aware that this Fixpack wasn't contained in SP14. Portal 94 fixed this Issue (but introduced a new one, so that I can't use "Link to Page" Fields in my Structures anymore. But that's another Story)
thumbnail
Juan Gonzalez, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Hi Klaus,

then, please open a ticket in Liferay Support so they can provide you a hotfix with your current patchlevel + the LPS you need in order to avoid that regression, or tell them to fix that regression so you're safe.

Thanks.
Klaus Bachmaier, modificado 8 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Regular Member Postagens: 223 Data de Entrada: 30/09/13 Postagens Recentes
LESA Ticket already opened.
Shruti A Mishra, modificado 7 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

New Member Postagens: 4 Data de Entrada: 28/11/16 Postagens Recentes
James Falkner:
Which version of Liferay? This was a bug that was fixed in 6.2 CE GA5. If you're not using that version, you'll need to upgrade to 6.2 CE GA5 or later (GA6 is the latest).

The only workaround is what Julien suggested.


Hi,

Writing on this old thread.
I am experiencing same problem. and LR version is 6.2 CE GA5.
Project is already on board so can not upgrade to GA6 at the moment.
Can you please throw some light on any way to get over this issue or any workaround.

Thanks in advance!
thumbnail
Alberto Chaparro, modificado 7 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Master Postagens: 549 Data de Entrada: 25/04/11 Postagens Recentes
Hi Shruti,

If you are using the EE version, please install a fix pack higher than fix-pack-72.
If you are using CE, upgrade to GA6 it's not difficult since it doesn't include database changes and your plugins should work (you just need if some of the Liferay classes you overwrite has changed). I suggest you do a test with a production database backup to realize that it's not complex. If you srill doesn't want to upgrade, check the commits included in the LPS-54513 (see commits sections) to know if you can create any workaround.

Best.
Shruti A Mishra, modificado 7 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

New Member Postagens: 4 Data de Entrada: 28/11/16 Postagens Recentes
Alberto Chaparro:
Hi Shruti,

If you are using the EE version, please install a fix pack higher than fix-pack-72.
If you are using CE, upgrade to GA6 it's not difficult since it doesn't include database changes and your plugins should work (you just need if some of the Liferay classes you overwrite has changed). I suggest you do a test with a production database backup to realize that it's not complex. If you srill doesn't want to upgrade, check the commits included in the LPS-54513 (see commits sections) to know if you can create any workaround.

Best.

Thanks For your Reply Alberto.
I tried this on GA6 as well but the issue persists.
Trying to look a workaround though commits.

Best Regards
thumbnail
Alberto Chaparro, modificado 7 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Master Postagens: 549 Data de Entrada: 25/04/11 Postagens Recentes
Hi Shruti,

If you are using Solr, be sure that you have installed latest version of the plugin (2.1.0):
https://web.liferay.com/marketplace/-/mp/application/30365680

As you can see in that page, the Lps is solved in that version. You should need to reindex once you have installed the new plugin version.

If it doesn't work, please open a new ticket explaining the steps to reproduce it.

Best regards
Alejandro Fernández, modificado 6 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

New Member Postagens: 3 Data de Entrada: 22/07/16 Postagens Recentes
Alberto Chaparro:
Hi Shruti,

If you are using the EE version, please install a fix pack higher than fix-pack-72.
If you are using CE, upgrade to GA6 it's not difficult since it doesn't include database changes and your plugins should work (you just need if some of the Liferay classes you overwrite has changed). I suggest you do a test with a production database backup to realize that it's not complex. If you srill doesn't want to upgrade, check the commits included in the LPS-54513 (see commits sections) to know if you can create any workaround.

Best.



Using last version of Liferay CE (GA6) and ordering by custom date field in the Asset Publisher is still not working. I guess there won't be any fix nor workaround for this? Can't find this Issue in the Issue tracker related to CE, it only appears related to EE and fixed there...
thumbnail
Alberto Chaparro, modificado 6 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Master Postagens: 549 Data de Entrada: 25/04/11 Postagens Recentes
Hi Alejandro,

Just in case, be sure that you have regenerated the solr index before doing the tests.

Best regards.
Alexander Liferay, modificado 6 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

New Member Postagens: 3 Data de Entrada: 22/07/16 Postagens Recentes
Alberto Chaparro:
Hi Alejandro,

Just in case, be sure that you have regenerated the solr index before doing the tests.

Best regards.


Thanks for your quick response.

I'm a bit lost about Solr. Is Solr the standard index in this version? I though it was optional and Lucene was the default one. Are they the same?

Besides that, I reindexed multiple times with no effect in the order of the contents...

More info:
https://issues.liferay.com/browse/LPS-54513
This issue fixed in CE doesn't include date fields.

https://issues.liferay.com/browse/LPS-60259
This one says only fixed in EE
Alexander Liferay, modificado 6 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

New Member Postagens: 3 Data de Entrada: 22/07/16 Postagens Recentes
Just did a clean test:

New blank site with just one structure and template with only a date
Created 4 web contents with 4 dates.
Asset publisher in a blank page, selecting all contents. Order by the date field, ascending or descending, doesn't work at all. Reindexed and same result.
thumbnail
Alberto Chaparro, modificado 6 Anos atrás.

RE: Asset Publisher 'Order by' not working for custom field

Liferay Master Postagens: 549 Data de Entrada: 25/04/11 Postagens Recentes
Hi Alexander,

Yes, you can use Lucene as search engine.

Regarding LPS-60259 you are right, it seems that there is a bug which hasn't been solved in CE yet. However the patch has been attached to the ticket, see the diff file. If you really need it, maybe you could overwrite the class file using that patch (it's only a java file).

Regards.