Site Settings cannot save modified robots.txt for a virtual host

Description

Robots.txt will not save

Steps:

  1. Assign a virtual host to a public site

  2. Attempt to modify the Robots and save.

Notice that the changes are not saved.

Activity

Show:

Tammy Fong July 18, 2012 at 8:37 PM

PASSED Manual Testing following the steps from the previous comment.

Fixed on:
Tomcat 6.0 + MySQL 5. Portal 6.0.x GIT ID: d734830f0dfd5f67dd12e34a4f045b38072a41a0.

robots.txt setting is saved successfully and shows when user navigates to the sitemap.

Tammy Fong April 10, 2012 at 5:50 AM
Edited

FAILED Manual Testing using the following steps:

1. Create site
2. Assign a virtual host to the public site
3. Modify the Robots and save
4. Navigate to virtualhost:8080/robots.txt

Fixed on:
Tomcat 7.0 + MySQL 5. 6.1.x EE GIT ID: edc130a6ca419ec6aefb7a6fff6e34ff2864a987.
Tomcat 7.0 + MySQL 5. 6.2.x GIT ID: fc10d81c69b3f564d67f43112b4fd7959fc6c25c.

The modified robots.txt will appear.

Failed on:
Tomcat 6.0 + MySQL 5. 6.0.x GIT ID: 9950f3a739626b251b4883636820229b1ff83b1f.

Changes in robots.txt cannot be saved at step 3.

Nicola Grigoletti April 4, 2012 at 7:45 AM

Hi all.

I think there is another small fix to do related to this one (I'already applied what you commited) and to the https://liferay.atlassian.net/browse/LPS-24069#icft=LPS-24069 (this one is still open).

If I request www.mysite.com/robots.txt and for the this community (group) I defined 'localhost' or any other string different from 'www.mysite.com', I obtain an exception like com.liferay.portal.NoSuchVirtualHostException: No VirtualHost exists with the key...

To avoid this you could add 'catch (NoSuchVirtualHostException nsvhe) {}' at row 76. In this way layoutSet is null, and LP returns default robots for "without" virtual host.

I hope this could help.

Bye
Nicola

Tammy Fong February 10, 2012 at 2:37 AM

PASSED Manual testing using the following steps:

1. Create site
2. Assign a virtual host to the public site
3. Modify the Robots and save
4. Navigate to virtualhost:8080/robots.txt

Reproduced on:
Tomcat 7.0.23 + MySQL 5. 6.1.0 RC1.

Modified robots cannot be saved.

Fixed on:
Tomcat 7.0.25 + MySQL 5. 6.1.x GIT ID: 7ca618e28e1b85ffe92bf401a3e18f9c068dabe3.
Tomcat 7.0.25 + MySQL 5. 6.2.x GIT ID: 1dd1dc2fcb969bb8e1b41340a7cf582d1ad81aa6.

Modified robts can be saved. The changes will be shown at the robots link.

Michael Saechang February 9, 2012 at 5:13 PM

Committed on:
6.1.x GIT ID: 0e31f2814b3a10df53d47422e585b002fb321318.
6.2.x GIT ID: 49a3c06283c15ac0280d8da95232b1f8e4aac9ee.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Branch Version/s

6.1.x
6.0.x

Backported to Branch

Committed

Epic/Theme

Fix Priority

4

Affects versions

Priority

Zendesk Support

Created January 27, 2012 at 10:44 AM
Updated June 24, 2023 at 3:48 PM
Resolved July 18, 2012 at 8:38 PM