Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
-
Fix Version/s: 6.1.X EE, 6.2.0 CE M4
-
Component/s: Frameworks, Frameworks > Export/Import, WCM, WCM > Asset Publisher
-
Branch Version/s:6.1.x
-
Backported to Branch:Committed
-
Story Points:3
-
Fix Priority:5
-
Similar Issues:
Description
Steps to reproduce on a clean bundle:
1. Start with the Guest site.
2. Add a page to the Guest site.
3. Delete the page you added.
4. Add another page "test" to the Guest site.
5. Add a Blogs portlet to the new page.
6. Go to the Configuration screen for the Blogs portlet.
7. Go to the "Scope" tab and choose "Select Page", "Current Page".
8. Add an Asset Publisher portlet to the page.
9. Go to the Configuration screen for the Asset Publisher portlet.
10. Under the "Scope" heading, choose "Select More Than One...".
11. Move all options from Available over to Selected. Note you should have three options.
12. Save the configuration. Note that there are three "Add New" options.
13. In the Dockbar, choose Manage > Site Pages and export the site with the default settings.
14. Navigate to the Sites portlet in the Control panel and add a new site.
15. Choose the "Site Pages" portlet in the Control panel (with the scope set to your new site) and import the LAR exported in step 13.
16. Choose "View Pages" and navigate to the page you created in step 4.
Expected behavior:
You should see three "Add New" options.
Actual behavior:
In trunk, you see two "Add New" options (the page scope is missing). In earlier versions of Liferay, the asset publisher portlet errors out completely and nothing is displayed. In both cases, you will see a stack trace in the console which reads: "com.liferay.portal.NoSuchGroupException: No Group exists with the primary key 0"
Probable cause:
The way we store asset publisher scope groups is with Layout_
{layoutId}, where {layoutId}is that monotonically increasing number that can double as the friendly URL for the page. When you import a LAR, it re-computes a new value for
{layoutId} for each layout that is imported, but Asset Publisher's portlet preferences aren't updated to know what the new values are. Therefore, even though the appropriate scope groups are created, Asset Publisher will look for the wrong {layoutId}values because its portlet preferences are not updated.
Additional scenario to test:
based on above steps:
17. create another child page for "test" named "subtest"
18. Delete "subtest" child page and recreate it again
19. repeat steps from 6 to 12, in step 11 and 12, there are 4 options available.
if try to export and import again, either it throws nosuchGroupException or diplays the 4 options with bb, global, subtest, subtest, which is wrong. Should be bb, global, test, subtest
Issue Links
- relates
-
LPS-32674
DefaultScope in AssetPublisher preferences should be as boolean type
-

PASSED Manual Testing following the steps in the description.
Reproduced on:
Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2.
Tomcat throw error message, Content does not display.
Fixed on:
Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: b08d4ccc77beda2da0c801f9f40bf278c930802a.
Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 80a91b2c933dd73de26ca04b9d444f71e7d60b36.
Able to see three button.