Foros de discusión

Asset Publisher 'Order by' not working for custom field

Bernd S, modificado hace 8 años.

Asset Publisher 'Order by' not working for custom field

Junior Member Mensajes: 59 Fecha de incorporación: 31/03/15 Mensajes recientes
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 hace 8 años.

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

Junior Member Mensajes: 78 Fecha de incorporación: 22/01/15 Mensajes recientes
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 hace 8 años.

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

Liferay Legend Mensajes: 1399 Fecha de incorporación: 17/09/10 Mensajes recientes
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 hace 8 años.

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

Junior Member Mensajes: 59 Fecha de incorporación: 31/03/15 Mensajes recientes
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 hace 8 años.

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

Regular Member Mensajes: 223 Fecha de incorporación: 30/09/13 Mensajes recientes
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 hace 8 años.

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

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
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 hace 8 años.

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

Regular Member Mensajes: 223 Fecha de incorporación: 30/09/13 Mensajes recientes
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 hace 8 años.

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

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
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 hace 8 años.

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

Regular Member Mensajes: 223 Fecha de incorporación: 30/09/13 Mensajes recientes
LESA Ticket already opened.
Shruti A Mishra, modificado hace 7 años.

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

New Member Mensajes: 4 Fecha de incorporación: 28/11/16 Mensajes recientes
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 hace 7 años.

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

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
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 hace 7 años.

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

New Member Mensajes: 4 Fecha de incorporación: 28/11/16 Mensajes recientes
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 hace 7 años.

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

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
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 hace 6 años.

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

New Member Mensajes: 3 Fecha de incorporación: 22/07/16 Mensajes recientes
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 hace 6 años.

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

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
Hi Alejandro,

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

Best regards.
Alexander Liferay, modificado hace 6 años.

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

New Member Mensajes: 3 Fecha de incorporación: 22/07/16 Mensajes recientes
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 hace 6 años.

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

New Member Mensajes: 3 Fecha de incorporación: 22/07/16 Mensajes recientes
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 hace 6 años.

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

Liferay Master Mensajes: 549 Fecha de incorporación: 25/04/11 Mensajes recientes
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.