Foren

how to disable autogenerate ids 6.1ga1 (SOLVED)

gordon daniels, geändert vor 11 Jahren.

how to disable autogenerate ids 6.1ga1 (SOLVED)

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Hi,

I want to create my own ids for web content and so on. I put the following into portal-ext.properties, but it will not allow me to save:

journal.article.force.autogenerate.id=false

Is this the right statement or should it be called something else/

thanks
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
okay I found the statement in the portal.properties jar. For those of you who would like to use alphanumeric ids here it is:

journal.article.force.autogenerate.id=false

However, it doesn't work. Here is the error message:

'Your request failed to complete. '

Anyone have an idea on how to fix?

thanks
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Should put that property in portal-ext.properties instead of modifying portal.properties.
Put portal-ext.properties in ROOT\WEB-INF\classes
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
I did have it portal-ext.properties. I extracted the value from portal.properties file. ]

I'm confused by your statement to put portal-ex.properties in /ROOT/WEB-INF/clases. I thought for 6.1.ga1 portal-ext.properties goes into /liferay-portal-6.1.

thanks for replying
Linus Sphinx, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Junior Member Beiträge: 99 Beitrittsdatum: 12.08.10 Neueste Beiträge
May be confusing it with the newer portal-setup-wizard.properties located there? Looks like portal-ext.properties still found and read from original location in tomcat-x.x/webapps/ROOT/WEB-INF/classes here. Check your home directory too, it will read either one of those it finds there, think it even takes precedence.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
I'm disabling portal-setup-wizard.properties because it sometimes corrupt the system. It's possible to put portal-ext.properties where there's a CLASSPATH, but some application servers allow multiple nodes. If you put in at liferay-portal-6.1.0-ce-ga1, it's going to become global. It's better to keep it simple and make it always be in the same directory even when running only one instance.
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Hitoshi: I don't use setup-wizard. I've never read or heard anyone say to put 'portal-ext.properties' in /WEB-INF/classes directory before. I'm willing to give it a try. I'm not sure how that fixes the 'disable autogenerate' problem.

I want to be able to assign alphanumeric names to my ids for web content, docs, and images.

thanks for the reply
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
It's common from the earlier versions to put in under liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\ROOT\WEB-INF\classes\portal-ext.properties.

I'll test out the 'disable autogenerate' problem and see if I can reproduce it.
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Hitoshi: Your right. The earlier versions did that. I've moved it - just to test it out.

thanks for your help.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Just tested it and seems to work just fine.
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Hitoshi: Yes, I get that screen also. But after entering id name here is what happens:
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
I don't have such problem. Just saved it and approved it and it's displaying OK. As you can see from the attachment, I'm just entering TEST01 for the id. What are you entering?
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
I'm entering 'HEADER'. Does it have to be aphanumeric?

I thought it could be alpha only for instance.

really appreciate the help. Its helping me to trouble shoot this.
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
I get failed to complete no matter what I do.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Can you enter web content if the id is not autogenerated? (Well, at least the portal-ext.properties is being properly processed.)

Just tried with "HEADER" and was OK.
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Wow.! So its something wrong with my server.



Here is error from log:

Current URL /group/control_panel/manage?p_auth=Xmzdoc77&p_p_id=15&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&doAsGroupId=10180&refererPlid=10183&_15_struts_action=%2Fjournal%2Fedit_article generates exception: null
22:19:01,827 ERROR [IncludeTag:154] java.lang.NullPointerException

Not sure what that message means.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
If you're on linux, you have to set the following properties too. The default is to use the ip address. Add your server's ip address to redirect.url.ips.allowed=127.0.0.1,SERVER_IP

##
## Redirect
##

#
# Set this property to "ip" or "domain" for the redirect security method. If
# set to "domain", the portal will only redirect users to domains listed in
# the property "redirect.url.domain.allowed". If set to "ip", the portal
# will only redirect to domains whose IP address resolve to an IP address
# listed in the property "redirect.url.ip.allowed".
#
#redirect.url.security.mode=domain
redirect.url.security.mode=ip

#
# Input a list of comma delimited domains which the portal is allowed to
# redirect to. Input a blank list to allow any domain.
#
redirect.url.domains.allowed=

#
# Input a list of comma delimited IPs which the portal is allowed to
# redirect to. Input a blank list to allow any IP. SERVER_IP will be
# replaced with the IP of the host server.
#
redirect.url.ips.allowed=127.0.0.1,SERVER_IP
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Hitoshi: you are certainly the support today! Thanks will take a look and fix. I am using localhost for this box.
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
Hitoshi: Forgot to ask, where did you find that info?
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
From looking through the portal.properties file (I'm translating documents to Japanese) and from experience developing portlets. I'm often learning the hard way. :-)
gordon daniels, geändert vor 11 Jahren.

RE: how to disable autogenerate ids 6.1ga1

Liferay Master Beiträge: 797 Beitrittsdatum: 24.08.08 Neueste Beiträge
That's amazing! Well, I respect your work ethic. I've looked at the portal.properties file many times but I am not a developer, so some of it is difficult for me to understand. However, you have inspired me to study harder. Will search doc first from now on.

thanks for all your help today.