enonic / app-contentstudio

Content Studio of Enonic XP
GNU General Public License v3.0
10 stars 4 forks source link

Adding a tag in a content without a parent throws an exception #81

Closed sgauruseu closed 5 years ago

sgauruseu commented 5 years ago
  1. Upload an image content in root or any folder (not a site)
  2. Select and open the Image content in browser
  3. type text in tag-input and add new tag

BUG: error in browser console : http://localhost:8080/admin/rest/content/selectorQuery 500 (Server Error)

Server log; 14:21:31.073 ERROR c.e.x.j.i.e.JsonExceptionMapper - Could not resolve parent site for content: cape java.lang.RuntimeException: Could not resolve parent site for content: cape at com.enonic.xp.admin.impl.rest.resource.content.ContentSelectorQueryJsonToContentQueryConverter.resolveParentSiteIfNeeded(ContentSelectorQueryJsonToContentQueryConverter.java:119

alansemenov commented 5 years ago

Before you create a PR, make sure you fix DAFULT_ALLOWED_PATH and don't use property from ContentSelectorQueryRequest in the Tag class. If we decide to change default allowPath for content selector it should not affect tags, and vice versa.