OFBIZ-5896 This commits fixes a regression I introduced with rev. 1635232 (this actually reverts that commit) and provides a different and better fix for the error affecting the "Did you know?" screenlet.
ContentServicesComplex.getAssocAndContentAndDataResourceCacheMethod was not using the passed contentId in condition list, and also was not using the ContentAssocDataResourceViewFrom/To view entity to get the result. Thanks to Deepak Dixit for the patch. Misc minor cleanups (removed commented out code) and some small formatting fixes. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1643061 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -101,7 +101,7 @@ under the License.
|
||||
<Content contentId="CMSS_DEMO_HOME" contentTypeId="DOCUMENT" decoratorContentId="CMSS_DEC"
|
||||
contentName="CMS Site Demo Home Page" dataResourceId="CMSS_DEMO_HOME"/>
|
||||
<ContentPurpose contentId="CMSS_DEMO_HOME" contentPurposeTypeId="SECTION"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_HOME" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00" mapKey="demoHome"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_HOME" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00" mapKey="demoHome"/>
|
||||
<WebSiteContent webSiteId="CmsSite" contentId="CMSS_DEMO_HOME" webSiteContentTypeId="DEFAULT_PAGE" fromDate="2001-01-01 00:00:00"/>
|
||||
|
||||
<!-- yet another demo page -->
|
||||
@@ -114,7 +114,7 @@ under the License.
|
||||
</ElectronicText>
|
||||
<Content contentId="CMSS_DEMO_PAGE1" contentTypeId="DOCUMENT" decoratorContentId="CMSS_DEC" contentName="CMS Site Demo Page 1" dataResourceId="CMSS_DEMO_PAGE1"/>
|
||||
<ContentPurpose contentId="CMSS_DEMO_PAGE1" contentPurposeTypeId="SECTION"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_PAGE1" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00" mapKey="demoPage1"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_PAGE1" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00" mapKey="demoPage1"/>
|
||||
<DataResource dataResourceId="CMSS_DEMO_PAGE1_1" dataResourceTypeId="SHORT_TEXT" objectInfo="Sub-content 1"/>
|
||||
<Content contentId="CMSS_DEMO_PAGE1_1" contentTypeId="DOCUMENT" contentName="CMS Site Demo Page 1_1" dataResourceId="CMSS_DEMO_PAGE1_1"/>
|
||||
<ContentPurpose contentId="CMSS_DEMO_PAGE1_1" contentPurposeTypeId="SECTION"/>
|
||||
@@ -130,16 +130,16 @@ under the License.
|
||||
|
||||
<DataResource dataResourceId="CMSS_DEMO_SCREEN" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="SCREEN_COMBINED" objectInfo="component://cmssite/widget/CmssiteScreens.xml#testScreen"/>
|
||||
<Content contentId="CMSS_DEMO_SCREEN" contentTypeId="DOCUMENT" contentName="CMS Site Demo screen/decorator example" dataResourceId="CMSS_DEMO_SCREEN"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_SCREEN" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_SCREEN" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
|
||||
|
||||
<DataResource dataResourceId="CMSS_DEMO_BLOG" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="SCREEN_COMBINED" objectInfo="component://cmssite/widget/CmssiteScreens.xml#blogScreen"/>
|
||||
<Content contentId="CMSS_DEMO_BLOG" contentTypeId="DOCUMENT" contentName="CMS Site Demo blog screen example" dataResourceId="CMSS_DEMO_BLOG"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_BLOG" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_BLOG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
|
||||
|
||||
<DataResource dataResourceId="CMSS_DEMO_TPL_DATA" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="data xml file" mimeTypeId="text/xml" isPublic="Y"/>
|
||||
<DataResource dataResourceId="CMSS_DEMO_TPL_TEMPL" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" statusId="CTNT_IN_PROGRESS" dataResourceName="demo xml templ" mimeTypeId="text/html" isPublic="Y" />
|
||||
<Content contentId="CMSS_DEMO_TPL_DATA" contentTypeId="DOCUMENT" templateDataResourceId="CMSS_DEMO_TPL_TEMPL" dataResourceId="CMSS_DEMO_TPL_DATA" statusId="CTNT_IN_PROGRESS" contentName="Demo xml data + ftl template file" mimeTypeId="text/html"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_TPL_DATA" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_TPL_DATA" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
|
||||
<ElectronicText dataResourceId="CMSS_DEMO_TPL_DATA">
|
||||
<textData><![CDATA[
|
||||
<root>
|
||||
@@ -194,7 +194,7 @@ under the License.
|
||||
<DataResource dataResourceId="OFBIZ_HOME" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="SCREEN_COMBINED"
|
||||
objectInfo="component://cmssite/widget/OfbizsiteScreens.xml#main"/>
|
||||
<Content contentId="OFBIZ_HOME" contentTypeId="DOCUMENT" contentName="OFBiz Site Home Page" dataResourceId="OFBIZ_HOME"/>
|
||||
<ContentAssoc contentId="OFBIZ_PPOINT" contentIdTo="OFBIZ_HOME" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00" mapKey="demoHome"/>
|
||||
<ContentAssoc contentId="OFBIZ_PPOINT" contentIdTo="OFBIZ_HOME" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00" mapKey="demoHome"/>
|
||||
<WebSiteContent webSiteId="OfbizSite" contentId="OFBIZ_HOME" webSiteContentTypeId="DEFAULT_PAGE" fromDate="2001-01-01 00:00:00"/>
|
||||
|
||||
<!-- documents website -->
|
||||
@@ -219,8 +219,8 @@ under the License.
|
||||
<ContentAssoc contentId="DOCUMENTS" contentIdTo="APACHE_OFBIZ_U_HTML" contentAssocTypeId="SUB_CONTENT" fromDate="2006-01-12 01:01:01" sequenceNum=""/>
|
||||
|
||||
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="PUBLIC_DOCS" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="APACHE_OFBIZ_HTML" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00" mapKey="documents"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="APACHE_OFBIZ_PDF" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-01-01 00:00:00" mapKey="documents"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="PUBLIC_DOCS" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="APACHE_OFBIZ_HTML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00" mapKey="documents"/>
|
||||
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="APACHE_OFBIZ_PDF" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00" mapKey="documents"/>
|
||||
|
||||
</entity-engine-xml>
|
||||
|
||||
@@ -16,11 +16,10 @@ KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<#if decoratedContent??>
|
||||
|
||||
${(decoratedContent.subcontent.htmlHead)?default((thisContent.subcontent.htmlHead)!)}
|
||||
${(decoratedContent.subcontent.header)?default((thisContent.subcontent.header)!)}
|
||||
|
||||
${decoratedContent}
|
||||
|
||||
${(decoratedContent.subcontent.footer)?default((thisContent.subcontent.footer)!)}
|
||||
</#if>
|
||||
@@ -25,39 +25,39 @@ under the License.
|
||||
<WebSiteContent webSiteId="WebStore" contentId="WebStoreCONTENT" webSiteContentTypeId="PUBLISH_POINT" fromDate="2001-01-01 00:00:00"/>
|
||||
|
||||
<Content contentId="CNTGIZMOS" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Gizmos" description="Gizmos" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="CNTGIZMOS" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="CNTGIZMOS" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAttribute contentId="CNTGIZMOS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
|
||||
|
||||
<Content contentId="CNTGIZMOSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Large Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="CNTGIZMOSLRG" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="CNTGIZMOSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="CNTGIZMOSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Small Gizmos" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="CNTGIZMOSSML" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="CNTGIZMOSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="GIZMOSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTGIZMOS" contentName="Advocacy" description="Advocacy" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="GIZMOSLRG" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="GIZMOSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="GIZMOSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Case Studies" description="Case Studies" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="GIZMOSSML" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTGIZMOS" contentIdTo="GIZMOSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="CNTWIDGETS" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Widgets" description="Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAttribute contentId="CNTWIDGETS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="CNTWIDGETS" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="CNTWIDGETS" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="WIDGETSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Sightings" description="Sightings of Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="WIDGETSSML" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="WIDGETSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<Content contentId="WIDGETSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Care & Groom" description="Care and Grooming" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="WIDGETSLRG" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="WIDGETSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="CNTWIDGETSLRG" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTWIDGETS" contentName="Large Widgets" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="CNTWIDGETSLRG" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="CNTWIDGETSLRG" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
<Content contentId="CNTWIDGETSSML" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="CNTWIDGETS" contentName="Small Widgets" description="Large Widgets" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="CNTWIDGETSSML" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="CNTWIDGETSSML" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
|
||||
|
||||
<Content contentId="POLICY" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreCONTENT" contentName="Policies" description="Policies" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="POLICY" contentAssocTypeId="PUBLISH_LINK" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="POLICY" contentAssocTypeId="SUB_CONTENT" fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAttribute contentId="POLICY" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
|
||||
|
||||
<Content contentId="WebStoreFACTOID" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="" contentName="Factoids" description="Factoids" createdDate="2004-07-05 12:00:00.000" createdByUserLogin="admin"/>
|
||||
@@ -79,7 +79,7 @@ under the License.
|
||||
</ElectronicText>
|
||||
<Content contentId="STORE_POLICIES" contentTypeId="DOCUMENT" ownerContentId="WebStoreCONTENT" dataResourceId="STORE_POLICIES"
|
||||
contentName="Store Policies 1" description="Store Policies 1 Description" mimeTypeId="text/html" localeString="en_US" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES" mapKey="policies" contentAssocTypeId="PUBLISH_LINK"
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES" mapKey="policies" contentAssocTypeId="SUB_CONTENT"
|
||||
fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<DataResource dataResourceId="STORE_POLICIES2" dataResourceTypeId="ELECTRONIC_TEXT" mimeTypeId="text/html" localeString="en_US" isPublic="Y" dataResourceName="Store Policies"/>
|
||||
<ElectronicText dataResourceId="STORE_POLICIES2">
|
||||
@@ -96,6 +96,6 @@ under the License.
|
||||
</ElectronicText>
|
||||
<Content contentId="STORE_POLICIES2" contentTypeId="DOCUMENT" ownerContentId="WebStoreCONTENT" dataResourceId="STORE_POLICIES2"
|
||||
contentName="Store Policies 2" description="Store Policies 2 Description" mimeTypeId="text/html" localeString="en_US" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES2" mapKey="policies2" contentAssocTypeId="PUBLISH_LINK"
|
||||
<ContentAssoc contentId="WebStoreCONTENT" contentIdTo="STORE_POLICIES2" mapKey="policies2" contentAssocTypeId="SUB_CONTENT"
|
||||
fromDate="2001-05-13 12:00:00.000" createdDate="2001-05-13 12:00:00.000" createdByUserLogin="admin"/>
|
||||
</entity-engine-xml>
|
||||
|
||||
@@ -34,7 +34,7 @@ under the License.
|
||||
<#assign firstPart=internalNameParts[0] />
|
||||
<#assign nowStamp=Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp()/>
|
||||
<#if firstPart == "WIDGETS">
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="${contentId}" contentAssocTypeId="PUBLISH_LINK" fromDate="${nowStamp?string("yyyy-MM-dd HH:mm:ss")}"/>
|
||||
<ContentAssoc contentId="CNTWIDGETS" contentIdTo="${contentId}" contentAssocTypeId="SUB_CONTENT" fromDate="${nowStamp?string("yyyy-MM-dd HH:mm:ss")}"/>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user