Forums de discussion

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

thumbnail
Xavier Rodríguez, modifié il y a 10 années.

Asset Publisher doesn't sort correctly by "Publish Date", "Create Date",...

New Member Publications: 18 Date d'inscription: 02/08/13 Publications récentes
Hi,

I use 6.2.0 CE GA1 and I have problems with the "Asset Publisher" portlet. When I put it in my public or private page and then select "Configuration" --> "Ordering and Grouping" only works fine the ordenation by "title". If I choose "Publish Date", "Create Date",.. it is sorted wrong, without a logic order.

anyone can help me?

Regards,

- Xavier -
thumbnail
Marina Batet, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 24 Date d'inscription: 18/04/11 Publications récentes
I'm having the same issue. Asset publisher ordering doesn't work with date fields. And that's a pretty big issue for me. I'm reading the asset publisher portlet source code right now, trying to understand where this goes wrong.
thumbnail
James Falkner, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Liferay Legend Publications: 1399 Date d'inscription: 17/09/10 Publications récentes
Marina Batet:
I'm having the same issue. Asset publisher ordering doesn't work with date fields. And that's a pretty big issue for me. I'm reading the asset publisher portlet source code right now, trying to understand where this goes wrong.


I ran into a similar issue on 6.1 on the release dashboard page (which is a collection of web content articles sorted by date using asset publisher). What I found was that when you sort by date, it considers the date of each article as the "Display Date" of the earliest approved version of the article. So even if you update the 'Display Date' for the article, that display date is recorded with respect to the new version, and you have to go and delete the older versions so that the most recently approved version of the article corresponds to the one with the display date you wish to sort by. I see you filed LPS-42985 but I think if LPS-18407 is implemented it will resolve this issue.

The workaround I used was to just delete older versions of the article so that there is only one version of the article, then the sorting should work correctly.
thumbnail
Xavier Rodríguez, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 18 Date d'inscription: 02/08/13 Publications récentes
Hi James,

As I understand in bug LPS-42985 is that if you modify an article, the assetentry.publishdate field isn't updated with the journalarticle.displaydate. Then, the latest version of the article has the field journalarticle.displaydate updated correctly but not in the assetentry.publishdate. If you delete the older versions, you still have the problem.

The ordenation of the type "date" in the Asset Entry portlet not works fine and this is sure one of the reasons because this portlet has this problem.

Regards,

- Xavier -
Giuseppe Cultrera, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 4 Date d'inscription: 20/01/10 Publications récentes
I have the same identical problem in LR 6.2 CE.... any solution or the only one is not use the assett publisher because it become useless without ordering.
thumbnail
Marina Batet, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 24 Date d'inscription: 18/04/11 Publications récentes
The asset publisher ordering by dates don't work in the 6.2 version, as you can see in this bug: https://issues.liferay.com/browse/LPS-42802.

Now, in the master version in git repository they have fixed this issue, and the assets are properly sorted by date. The problem now it's that the publish date field of the asset it's not updated properly when you update a web content (see bug https://issues.liferay.com/browse/LPS-43039), so (with the master version) the assets appear sorted except if you update the asset display date.

So, as I see it, the asset publisher it's useless until they don't resolve this last bug. For me, it's a major issue, as I use asset publisher a lot.
thumbnail
Melvin Williams, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 20 Date d'inscription: 02/10/13 Publications récentes
When will this issue be solved? I spent hours writing a program that imports my contents from an old intranet keeping time-stamps. And now they are unordered. That's really annoying.
thumbnail
Marina Batet, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 24 Date d'inscription: 18/04/11 Publications récentes
Same problem here.

The https://issues.liferay.com/browse/LPS-42802 issue is closed now, so if you build the actual master version on the git repository AND then manually update the database assetentry's publishdate .... something like:

UPDATE assetentry SET publishdate=(select journalarticle.displaydate from journalarticle WHERE journalArticle.getResourcePrimKey() = asset.getClassPK()) 


AND then, do a reindexing, your imported articles will appear properly sorted (it's what we are doing right now).

But I think that is a moot point until they also resolve the https://issues.liferay.com/browse/LPS-42802 issue, because even if you see your imported articles properly sorted, the new ones you create will not be, and you would be at square one again.

In order to see the new content properly ordered we added a listener on the asset entry, like:

@Override
public void onBeforeUpdate(AssetEntry model) throws ModelListenerException 
{
try	
{
if(JournalArticle.class.getName().equals(model.getClassName()))
{	
JournalArticle journalArticle = JournalArticleServiceUtil.getLatestArticle(model.getClassPK());
if(journalArticle.getDisplayDate().after(new Date()))
{ model.setPublishDate(null); }
else
{	 model.setPublishDate(journalArticle.getDisplayDate()); }
}
} 
catch (Exception e)
{ log.error("[onBeforeUpdate]", e); }
}
}


And event if it's working, it doesn't solve all the cases.
juan meza, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Regular Member Publications: 228 Date d'inscription: 06/01/14 Publications récentes
im having this issue too
thumbnail
James Falkner, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Liferay Legend Publications: 1399 Date d'inscription: 17/09/10 Publications récentes
Melvin Williams:
When will this issue be solved? I spent hours writing a program that imports my contents from an old intranet keeping time-stamps. And now they are unordered. That's really annoying.


Hey Melvin, this should be resolved in a planned upcoming 6.2 CE GA2 release, slated for next month. It's already been fixed in master (you may be interested in trying it out using the latest master nightly build).
thumbnail
Melvin Williams, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 20 Date d'inscription: 02/10/13 Publications récentes
Hi James,

thanks for the link. Glad to here that the problem is solved now.
Muhammad Umer Zubair, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 18 Date d'inscription: 01/01/14 Publications récentes
James Falkner:
Melvin Williams:
When will this issue be solved? I spent hours writing a program that imports my contents from an old intranet keeping time-stamps. And now they are unordered. That's really annoying.


Hey Melvin, this should be resolved in a planned upcoming 6.2 CE GA2 release, slated for next month. It's already been fixed in master (you may be interested in trying it out using the latest master nightly build).


Hi James,

Can you please update, how to fix this problem in current release of 6.2. Or, you can advise custom application display templates (ADT) code to order the web content on Publish/Modified date.

Thanks
thumbnail
Juan Gonzalez, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Just search the LPS code (LPS-XXX) James told you in git (maybe you want to clone thee liferay github repository).

And then you can patch your code with those changes. There are many git tutorials for proceeding with these tasks.
Sergio Cabedo, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 3 Date d'inscription: 30/05/13 Publications récentes
Hi

I am working with Liferay 6.2 CE GA1 with Asset Publisher portlet and I have the same problem. I have run UPDATE stament that says Marina Batet, the mistake persists.

Any idea to fix it?
thumbnail
Marina Batet, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 24 Date d'inscription: 18/04/11 Publications récentes
Liferay 6.2 CE GA1 does not sort properly by date. You need to download & build the master version or wait for the 6.2 CE GA2 release. But even with the current master version, in my opinion the problem is not totally resolved (when you change the display date of a web content to a future date, the asset entry it's not properly updated and as a result, you don't see the content properly sorted).
thumbnail
Melvin Williams, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 20 Date d'inscription: 02/10/13 Publications récentes
The version in the master says 7.0.0. Did I checkout the wrong branch? When will GA2 be released?
Muhammad Umer Zubair, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

New Member Publications: 18 Date d'inscription: 01/01/14 Publications récentes
Juan Gonzalez:
Just search the LPS code (LPS-XXX) James told you in git (maybe you want to clone thee liferay github repository).

And then you can patch your code with those changes. There are many git tutorials for proceeding with these tasks.



Hi Juan,

Can you explain it bit more, as i am new to git and cloning/patching liferay against LPS code.

Your help will be highly appreciated in this regard.

Thanks in advance.
thumbnail
Juan Gonzalez, modifié il y a 10 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Hi Muhammad,

you don't have to worry about this issue anymore.

Next Liferay version (where this issue is fixed) will be released very soon.
Virat sen, modifié il y a 8 années.

Re: [Liferay Forums][General] RE: Asset Publisher doesn't sort correctly by

Junior Member Publications: 57 Date d'inscription: 21/07/13 Publications récentes
Hi,
LR 6.2 GA2 come in action.
Hope this issue is solved.
Plz chk.

Thanks!!
On Mar 21, 2014 3:36 PM, "Juan Gonzalez from liferay.com" <
forums@liferay.com> wrote:

> Hi Muhammad,
>
> you don't have to worry about this issue anymore.
>
> Next Liferay version (where this issue is fixed) will be released very
> soon.
>
>
> To view the thread, follow the link below:
>
> https://www.liferay.com/community/forums/-/message_boards/view_message/35959439
> --
> Liferay.com <https://www.liferay.com>
robin thakur, modifié il y a 9 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Regular Member Publications: 146 Date d'inscription: 09/01/14 Publications récentes
Hi

I am using liferay 6.2.0 CE GA1 but I am not getting configuration->Grouping and Ordering option in my portal.
Can u tell how do i get this option for my asset publisher.


Thanks
thumbnail
Enrique Valdes Lacasa, modifié il y a 7 années.

RE: Asset Publisher doesn't sort correctly by "Publish Date", "Create Date"

Junior Member Publications: 92 Date d'inscription: 29/07/14 Publications récentes
Hello everyone, and thanks for working on the issue.

I am using Liferay CE 6.2.5 ga6...and I am experiencing the same problem.

I tried to sort my results in an Asset Publisher with an ADT by choosing the following in the portlet's configuration:
Ordering and Grouping > Order By > Date, which is a field of type Date from the structure that I choose to display the web content articles using Asset Type > Web Content Article > Web Content Article Subtype = MyStructure

But the Web Content articles don't get sorted.

I would appreciate any feedback on this.

Thanks!