Foren

URL field in Announcements Portlet

thumbnail
Felix O, geändert vor 13 Jahren.

URL field in Announcements Portlet

New Member Beiträge: 21 Beitrittsdatum: 26.07.10 Neueste Beiträge
Hi, is it possible to make announcements without filling the URL field?

I only want to use announcements for short messages without a link to a
special page.


Im using the latest nightly relase Liferay 6.0.5
thumbnail
Shagul Khajamohideen, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

Liferay Master Beiträge: 758 Beitrittsdatum: 27.09.07 Neueste Beiträge
Do you see any issues? I don't think URL is a mandatory field.
Aaron East, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 3 Beitrittsdatum: 09.08.10 Neueste Beiträge
I have the same problem, in earlier versions of the announcments and alerts portlet the URL was not required. Most if not all of our announcments are just a little text that do not need to be redirected to a URL.
thumbnail
Shagul Khajamohideen, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

Liferay Master Beiträge: 758 Beitrittsdatum: 27.09.07 Neueste Beiträge
Probably you could watch the below JIRA ticket.

http://issues.liferay.com/browse/LPS-10263

Based on the latest code, it does not look like the field is mandatory. URL is validated only when it is not null (not empty).
thumbnail
Felix O, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 21 Beitrittsdatum: 26.07.10 Neueste Beiträge
Its defenatly a mandatory field in v6.0.x . he wont let me go on until i enter a valid url.
thumbnail
Shagul Khajamohideen, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

Liferay Master Beiträge: 758 Beitrittsdatum: 27.09.07 Neueste Beiträge
I see the code now. Not sure if it is intentional. I think, URL validation should only happen when there is some entry in the URL field.
Aaron East, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 3 Beitrittsdatum: 09.08.10 Neueste Beiträge
Hmm, still doesn't look like it is fixed. I downloaded the nightly build.

liferay-portal-tomcat-2010-08-10.zip 10-Aug-2010 04:42 134M

And still I am required to add a URL
thumbnail
Shagul Khajamohideen, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

Liferay Master Beiträge: 758 Beitrittsdatum: 27.09.07 Neueste Beiträge
The code does mandate valid URL be entered. I have updated the ticket. My guess is, the check when URL is empty seems unintended unless someone from Liferay can confirm that it is intended.
thumbnail
Felix O, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 21 Beitrittsdatum: 26.07.10 Neueste Beiträge
This Bug iss still not fixed in 6.0.5. Could anyone solve this
annoying Bug? its such a simple one....
Ryan Lubben, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beitrag: 1 Beitrittsdatum: 18.09.10 Neueste Beiträge
Still having this problem with 6.0.5. Please fix.
Joan cuadros, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 9 Beitrittsdatum: 30.11.10 Neueste Beiträge
I have the same problem. Please fix.
Gert Christiansen, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 7 Beitrittsdatum: 09.04.10 Neueste Beiträge
Ran in to the same problem with 6.0.5. Haven't tried a checkout of the nightly, but made a small change against the source for 6.0.5

The only change is in line 541 of AnnouncementsEntryLocalServiceImpl.java from

if (!Validator.isUrl(url)) {

to

if ((url.length() > 0) && !Validator.isUrl(url)) {

Not sure if this has been corrected in the current development version or if the change I made is the correct way, but it seems to work.

Copy the attached AnnouncementsEntryLocalServiceImpl.class to your WEB-INF/classes structure to overload the one from the war file.

Mine is at /opt/liferay/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/com/liferay/portlet/announcements/service/impl

I restarted Liferay to make sure the extra file was loaded.

Use at your own risk.

Regards,
Gert
L P, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 3 Beitrittsdatum: 15.04.09 Neueste Beiträge
Gert Christiansen:

Copy the attached AnnouncementsEntryLocalServiceImpl.class to your WEB-INF/classes structure to overload the one from the war file.

Mine is at /opt/liferay/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/com/liferay/portlet/announcements/service/impl

I restarted Liferay to make sure the extra file was loaded.




Works like a charm, thanks!
thumbnail
Szymon Gołębiewski, geändert vor 13 Jahren.

RE: URL field in Announcements Portlet

Regular Member Beiträge: 246 Beitrittsdatum: 08.06.09 Neueste Beiträge
Gert Christiansen:
Ran in to the same problem with 6.0.5. Haven't tried a checkout of the nightly, but made a small change against the source for 6.0.5

The only change is in line 541 of AnnouncementsEntryLocalServiceImpl.java from

if (!Validator.isUrl(url)) {

to

if ((url.length() > 0) && !Validator.isUrl(url)) {

Not sure if this has been corrected in the current development version or if the change I made is the correct way, but it seems to work.

Copy the attached AnnouncementsEntryLocalServiceImpl.class to your WEB-INF/classes structure to overload the one from the war file.

Mine is at /opt/liferay/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/com/liferay/portlet/announcements/service/impl

I restarted Liferay to make sure the extra file was loaded.

Use at your own risk.

Regards,
Gert


I think you should submitt a ticket in liferay JIRA and add this as Community Contribution. This patch is awesome.
Christian Schefer, geändert vor 12 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 19 Beitrittsdatum: 27.05.11 Neueste Beiträge
Hi,

I have the same problem, i'm using Windows Server 2003 and the Liferay Bundle with Tomcat. I dont know where to put that file. Could you help me to implement in my environment please?

I didn't found the tree structure "../tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/com/liferay/portlet/announcements/service/impl"

Thank you!!

Christian
thumbnail
Hitoshi Ozawa, geändert vor 12 Jahren.

RE: URL field in Announcements Portlet

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
You really should be creating a ext plugin for this instead of changing the Liferay class file directly.

But that said, the class file is at
"../tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar"
Open up this jar file and the class file is in the following folder:
"com/liferay/portlet/announcements/service/impl"
Christian Schefer, geändert vor 12 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 19 Beitrittsdatum: 27.05.11 Neueste Beiträge
Hitoshi Ozawa:
You really should be creating a ext plugin for this instead of changing the Liferay class file directly.

But that said, the class file is at
"../tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar"
Open up this jar file and the class file is in the following folder:
"com/liferay/portlet/announcements/service/impl"


Thanks!!

It works for me!!
thumbnail
Cory Church, geändert vor 12 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 8 Beitrittsdatum: 15.12.11 Neueste Beiträge
Christian Schefer:
Hitoshi Ozawa:
You really should be creating a ext plugin for this instead of changing the Liferay class file directly.

But that said, the class file is at
"../tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar"
Open up this jar file and the class file is in the following folder:
"com/liferay/portlet/announcements/service/impl"


Thanks!!

It works for me!!



Worked like a charm in the latest stable build. Thank you.
thumbnail
Alessandro Trosino, geändert vor 12 Jahren.

RE: URL field in Announcements Portlet

New Member Beiträge: 14 Beitrittsdatum: 25.10.11 Neueste Beiträge
Gert Christiansen:
Ran in to the same problem with 6.0.5. Haven't tried a checkout of the nightly, but made a small change against the source for 6.0.5

The only change is in line 541 of AnnouncementsEntryLocalServiceImpl.java from

if (!Validator.isUrl(url)) {

to

if ((url.length() > 0) && !Validator.isUrl(url)) {

Not sure if this has been corrected in the current development version or if the change I made is the correct way, but it seems to work.

Copy the attached AnnouncementsEntryLocalServiceImpl.class to your WEB-INF/classes structure to overload the one from the war file.

Mine is at /opt/liferay/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/com/liferay/portlet/announcements/service/impl

I restarted Liferay to make sure the extra file was loaded.

Use at your own risk.

Regards,
Gert


link for download doesn't work
thumbnail
Zeeshan Khan, geändert vor 11 Jahren.

RE: URL field in Announcements Portlet

Expert Beiträge: 349 Beitrittsdatum: 21.07.11 Neueste Beiträge
Gert Christiansen:
Ran in to the same problem with 6.0.5. Haven't tried a checkout of the nightly, but made a small change against the source for 6.0.5

The only change is in line 541 of AnnouncementsEntryLocalServiceImpl.java from

if (!Validator.isUrl(url)) {

to

if ((url.length() > 0) && !Validator.isUrl(url)) {

Not sure if this has been corrected in the current development version or if the change I made is the correct way, but it seems to work.

Copy the attached AnnouncementsEntryLocalServiceImpl.class to your WEB-INF/classes structure to overload the one from the war file.

Mine is at /opt/liferay/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/com/liferay/portlet/announcements/service/impl

I restarted Liferay to make sure the extra file was loaded.

Use at your own risk.

Regards,
Gert




awsome post Gert !!

thanks a ton !!