לוחות מודעות לוחות מודעות

Bugs

Asset Publisher - custom types not shown

אשכולות [ קודם | הבא ]
מתג
Asset Publisher - custom types not shown
תשובה
11:26 08/09/16
Hello,

I followed steps at https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/implementing-asset-categorization-and-tagging

I have AssetEntry table entries for my new custom type. And I have registered AssetRendererFactory component. However, Asset Publisher doesn't show my custom type. What is missing? I expect that Asset Publisher will show new type under "Asset Type" in Asset Publisher configuration, but it is now shown.


For example, why "layout" is not shown in Asset Publisher configuration screen?
1234567891011


@Component(
    immediate = true,
    property = {"javax.portlet.name=" + LayoutAdminPortletKeys.LAYOUT_ADMIN},
    service = AssetRendererFactory.class
)
public class LayoutAssetRendererFactory
    extends BaseAssetRendererFactory<Layout> {

    public static final String TYPE = "layout";



Thanks,


UPDATE:

Something went wrong with my dependencies; all modules were successfully deployed, but portlet was not available. I believe not only "portlet" but also other @Component such as AssetRendererFactory. But Felix console was showing all "active"; I even explicitly uninstalled, changed versions, and installed again.

Then I found trivial typo in "build.gradle" pointing to wrong "*.svc" and "*.api" modules, which doesn't make any sence; it was built and deployed successfully even with this trivial typo. I fixed it, and now I have Portlet available again in "Add application" section, and I even have my new object type available in Asset Publisher!

Some strange magic.


Lessons learned: never waste time on stupid things... I was going to hack Asset Publisher in order to understand why it doesn't work. Thanks God I saved weeks of efforts!
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
18:17 09/09/16 כתגובה ל-Fuad Efendi
Am I posting to the right place?

Here is the link to my project source code:
https://github.com/FuadEfendi/liferay-osgi/tree/master/modules/ca.efendi.datafeeds.svc/src/main/java/ca/efendi/datafeeds/asset


I can see new object type "CJ Product" (which is Comission Junction product type) in Asset Manager configuration screen, but no any products shown; and search doesn't show anything in search results. And I have about 30,000 entries in AssetEntry table after processing single datafeed from Comission Junction (Conversant).

Where else I can post? Noone responds here anymore. My whole project is in GitHub, Apache 2.0 licensed. Liferay 7.0 CE GA3, Liferay Workspace / Gradle.


Thank you!
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
18:32 09/09/16 כתגובה ל-Fuad Efendi
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
21:59 09/09/16 כתגובה ל-Fuad Efendi
I am trying to debug search and I cannot see my cutom object in generated query: "entryClassName" : "ca.efendi.datafeeds.model.CJProduct"

What could be wrong? Bug in Liferay?


1
21:52:32,598 INFO  [http-nio-8080-exec-9][ElasticsearchIndexSearcher:497] The search engine processed {_  "bool" : {_    "must" : {_      "bool" : {_        "must" : {_          "bool" : {_            "should" : [ {_              "wildcard" : {_                "assetCategoryTitles" : "*spandex*"_              }_            }, {_              "wildcard" : {_                "assetCategoryTitles_en_US" : "*spandex*"_              }_            }, {_              "term" : {_                "assetTagNames" : "spandex"_              }_            }, {_              "wildcard" : {_                "assetCategoryTitles" : "*spandex*"_              }_            }, {_              "wildcard" : {_                "assetTagNames" : "*spandex*"_              }_            }, {_              "match" : {_                "comments" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "content" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "description" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "properties" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "title" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "url" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "userName" : "*spandex*"_              }_            }, {_              "match" : {_                "ddmContent" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "extension" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "fileEntryTypeId" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "path" : "*spandex*"_              }_            }, {_              "match" : {_                "city" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "country" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "emailAddress" : "*spandex*"_              }_            }, {_              "wildcard" : {_                "firstName" : "*spandex*"_              }_            }, {_              "match" : {_                "fullName" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "lastName" : "*spandex*"_              }_            }, {_              "wildcard" : {_                "middleName" : "*spandex*"_              }_            }, {_              "match" : {_                "region" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "screenName" : "*spandex*"_              }_            }, {_              "match" : {_                "street" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "zip" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "userName" : "*spandex*"_              }_            }, {_              "match" : {_                "ddmContent" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "articleId" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "classPK" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "content_en_US" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "description_en_US" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "entryClassPK" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "match" : {_                "title_en_US" : {_                  "query" : "spandex",_                  "type" : "boolean"_                }_              }_            }, {_              "wildcard" : {_                "userName" : "*spandex*"_              }_            } ]_          }_        }_      }_    },_    "filter" : {_      "bool" : {_        "must" : [ {_          "term" : {_            "companyId" : "20116"_          }_        }, {_          "bool" : {_            "must" : [ {_              "bool" : {_                "should" : [ {_                  "bool" : {_                    "must" : [ {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.wiki.model.WikiPage"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.document.library.kernel.model.DLFileEntry"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "term" : {_                        "status" : "0"_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.portal.kernel.model.User"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.bookmarks.model.BookmarksFolder"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.blogs.kernel.model.BlogsEntry"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "term" : {_                        "hidden" : "false"_                      }_                    }, {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.document.library.kernel.model.DLFolder"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "term" : {_                        "status" : "0"_                      }_                    }, {_                      "term" : {_                        "recordSetScope" : "0"_                      }_                    }, {_                      "bool" : {_                        "should" : [ {_                          "term" : {_                            "entryClassName" : "com.liferay.dynamic.data.lists.model.DDLRecordSet"_                          }_                        }, {_                          "term" : {_                            "entryClassName" : "com.liferay.dynamic.data.lists.model.DDLRecord"_                          }_                        } ]_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.bookmarks.model.BookmarksEntry"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "term" : {_                        "head" : "true"_                      }_                    }, {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.journal.model.JournalArticle"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.journal.model.JournalFolder"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : [ {_                      "term" : {_                        "discussion" : "false"_                      }_                    }, {_                      "terms" : {_                        "status" : [ "0" ]_                      }_                    }, {_                      "bool" : {_                        "should" : {_                          "term" : {_                            "entryClassName" : "com.liferay.message.boards.kernel.model.MBMessage"_                          }_                        }_                      }_                    } ]_                  }_                }, {_                  "bool" : {_                    "must" : {_                      "bool" : {_                        "should" : [ {_                          "term" : {_                            "entryClassName" : "com.liferay.calendar.model.Calendar"_                          }_                        }, {_                          "term" : {_                            "entryClassName" : "com.liferay.calendar.model.CalendarBooking"_                          }_                        } ]_                      }_                    }_                  }_                } ]_              }_            }, {_              "bool" : {_                "must" : [ {_                  "terms" : {_                    "groupId" : [ "20147" ]_                  }_                }, {_                  "terms" : {_                    "scopeGroupId" : [ "20147" ]_                  }_                } ]_              }_            } ]_          }_        } ]_      }_    }_  }_} in 65ms [Sanitized]
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
14:28 10/09/16 כתגובה ל-Fuad Efendi
Solved:

123456

CJProductAssetRendererFactory() {
    ...
    setSearchable(true);
    ....
}

Now, both Asset Publisher and Search work fine. My applauds!

See class com.liferay.portal.search.web.internal.facet.AssetEntriesSearchFacet for the details.
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
08:39 12/04/19 כתגובה ל-Fuad Efendi
I was trying to delete 30,000 records in a loop, and it seems that MySQL has *more than a few minutes delay* somewhere in the middle of the loop. I was following BlogsEntry example of deletion all assets by Group ID. 
run 3 free
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
09:31 10/05/19 כתגובה ל-Fuad Efendi
I am a beginner and work for Custom Dissertation Help Service and would like to know about this language anyone can support me to learn about some programming language?
0 (0 הצבעות)

RE: Asset Publisher - custom types not shown
תשובה
02:31 24/05/19 כתגובה ל-Fuad Efendi
Thanks for this wonderful article and continue sharing more topics like this.

cool math games
0 (0 הצבעות)