Orchard : DateTime Field doesn't appear in search index - orchardcms

I have created one content part say News which is attachable, having one property of type DateTime
I have attached this content part to one content type.
in content type I have set "Include in index" for my DateTime field of content part.
now i have created one index say NewsIndex.
Set this newsIndex in content type (Published Version)
Rebuild index.
now when i go to Settings->Search, I am not able to see my DateTime field check box over there.
I am using Orchard version : 1.10.1.0
I have tried above situation by both way.. (From admin dashboard and using Code)
Facing this issue since 5 day, trying a lot but not able to get success. Really needed help on this.

Related

KQL (Keyword not Kusto) Nesting, Document Selecting for an Extranet

Longtime member, been a while since posting. Working on building out an Extranet and am running into a stupidly frustrating issue. First time using SharePoint Online as document repository for external (anonymous) users. In doing so, using Azure permissoning, have the documents split up in repositories on SharePoint based on access level. On top of that I am attempting to display them in Highlighted Content Web part, I am not able to sort them out by location AND type. I have a custom column in each repository that defines what type they are, but when I try to add the AND portion to the KQL it doesn't work. Additionally the internet seems to be massively void of actual documentation of KQL.
(
path:https://domain.sharepoint.com/sites/example/Level%201%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%202%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%203%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%204%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%205%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%206%20Resources/
AND
DocType:"Articles"
)
The above will simply pull all documents from those locations and ignore the AND statement. I have tried renaming it to call on the custom column identifier pulled from the source, and that doesn't work either.
The only real documentation I can find on this is: Here
Which doesn't appear to address filtering based on custom column tags.
EDIT: Reformatted to pull all docs from multiple locations using below, but the nesting portion still isn't working
path:(
"https://domain.sharepoint.com/sites/example/Level%201%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%202%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%203%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%204%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%205%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%206%20Resources/"
)
So the additional issue I was running into was the creation of a column to separate out based on the category of file type (not literal file type). Apparently SPO doesn't like it when you create a list and then reference that list to then filter by via KQL. So I found this morning this.
Apparently the best way to do this is create a custom "Choice" column, allow some time for it to flow and update, and then you can reference it via KQL.

Sharepoint Online - How to get content type column names in a web part

I created a content type, let's say "invoices" and several columns such as "clientName", "clientAddress", "clientRefCode" etc. I also created a Document library that I connected to the content type.
The project i work in consists on developping a search engine using a specific component web part. Once created, I tried some stuffs to display information concerning context but without a lot of success...
My actual objective consists on retrieving the column names and their type (single line text, multiline, choice / select) in order to build a form using javascript.
You could use rest api to get content type columns. Like this:
_api/web/contenttypes(contenttypeid)/fields

SharePoint 2013 TaxonomyFieldType in custom list has IsTermSetValid = False

I'm using Visual Studio 2012 to create a custom Site Column of type TaxonomyFieldType, a custom content type that uses it, and a custom list that uses the content type.
Everything appears to deploy fine. If I look at my custom site column it appears to reference the proper termset correctly. I can create a new list in the web UI that uses my custom content type just fine. However, my custom list created using the Visual Studio 2012 List template always shows my taxonomy field as disabled on the new form. Here are the other things I've witnessed about it:
In the web UI of SharePoint, if I go to the list properties and drill into my taxonomy site column I notice it shows that it isn't mapped to a termset. Keep in mind that if I do the same thing in Site Settings for my content type it appears correct. I can do the same thing for the web UI created custom list and everything is fine (editable in the new form and the field has the termset defined).
If I use powershell to dump out the info for the site column itself it has a valid termset.
If I use powershell to dump out the info for the field in the VS2012 created list it shows emtpy guid for the SspId, TermSetId, and TextField. It also shows IsTermSetValid = False.
If I use powershell to dump out the info for the field in the SharePoint web UI created list it shows the correct guid for the SspId, TermSetId, and TextField. It also shows IsTermSetValid = True.
Does anyone know why I seem to be having this behavior for the VS 2012 create custom list? Any help is appreciated.
Okay, so I'm going to answer my own question. Hopefully this will help someone else in the future.
My issue was that when creating a sample list for my content type (described in original question post), using the SharePoint UI, the needed Note field was getting added. Even if I had this right in my original TaxonomyFieldType declaration, I would have also ran into issues with my field values not showing up in the search refiners later on when I got to that part. Thankfully Ari Bakker has written a very detail explanation of what all you need to do in order to create your custom TaxonomyFieldType derived field, a custom content type to use it, a list definition, and a list instance. Just follow the details in the article: http://www.sharepointconfig.com/2011/03/the-complete-guide-to-provisioning-sharepoint-2010-managed-metadata-fields/

Add finding attribute by name in Opencart Admin panel: Catalog - Attributes - Attributes

How to implement Attribute to find his own name in the admin area in Opencart : Products - Attributes - Attributes? Is that there is a separate field and simply by driving into the field and displays the name of the attribute is an attribute, as usual searching for items in the admin by name, but only with attribute
It's hard to understand what you are asking, but if you are trying to use attributes for products then you must first define them at catalog>attributes>attributes.
To List attributes in the Products tab you will need edit these files
admin>view>template>catalog>product_form.tpl
admin>controller>catalog>product.php
If your understanding of PHP or Opencart isn't very strong it will help you to copy data from the attribute.php controller to the product.php controller.
As for the search function, this is something I haven't done before but you could try using the search function on the front of the website as reference.
I recommend working through this as best you can then asking more questions if or when you get stuck.
*Update
Ok so since HTML is your strenth it will be smartest to start from there. Open any of these files (the ones that have the data you need).
admin>view>template>catalog>attribute_form.tpl
admin>view>template>catalog>attribute_group_form.tpl
admin>view>template>catalog>attribute_group_list.tpl
admin>view>template>catalog>attribute_list.tpl
Then work backwards with what you see. The tpl will show variables that look like $attribute, track these back to
admin>controller>catalog>attribute.php
admin>controller>catalog>attribute_group.php
And you will see how all the code is used to pull the data from the model and format it if necessary.

Unable to create a content type - A duplicate content type was found

I'm having this problem and I didnt find any answers on the web.
I have a content type named "Document X" with the original "Document" as parent. (ID is 0x010100ACEA2663B318874AA9192CA9AF678614)
I already have a content type named "Document X 1" with "Document X" as parent. (ID is 0x010100ACEA2663B318874AA9192CA9AF67861401)
When I create a new content type named "Document X 2" with the parent "Document X", I get the error "A duplicate content type 'Document X 2' was found"...
I checked the ULS and the error isn't reported there. I can create new content type from any other content type (out of the box or others I created like "Calendar X") but I cant create new one from that "Document X". (And no I dont have any content type named like that.. whatever name I use, I get the same error)
Full error is:
A duplicate content type "Document X" was found.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: b9d36bb8-1a8e-4ef4-bbd0-fbdf8e70d73b
Date and Time: 1/24/2011 3:00:36 PM
This error is happening on my content type hub site but I use and create content type on this site only. I dont create them using Visual studio, its in a production environnement and we have to create them with the Site Settings or Designer but both give me the same error.
I know I dont have much info to give here, I just dont know where to look first..
If anyone have any idea that could help me, I would really appreciate it as I lost a few hours on this already and dont know where to look anymore...
Thanks a lot!
I found my problem, so if this can help some people some day.
Looks like SharePoint have some problems sometimes to update a field in the content database.
The field NextChildByte from the dbo.ContentTypes table is the problem.
Lets say I create a content type with ID 0x010100ACEA2663B318874AA9192CA9AF678614 with Document as parent (0x0101)
SharePoint will create an entry in the dbo.ContentTypes table.
When I create an other content type with the first one as parent.. The ID of this new content type will be 0x010100ACEA2663B318874AA9192CA9AF678614*01*) This 01 came from the NextChildByte field from the dbo.ContentTypes table.
Now SharePoint should update the dbo.ContentTypes table and set the field NextChildByte to 2 so the next content type created using the same parent will be 0x010100ACEA2663B318874AA9192CA9AF678614*02*
My problem was.. SharePoint didnt update the NextChildByte field so SharePoint was trying to create a content type with ID 0x010100ACEA2663B318874AA9192CA9AF678614*01* when it already existed...
In my case.. I finally have been able to delete the content type 0x010100ACEA2663B318874AA9192CA9AF678614*01*. When I recreated it, SharePoint did update the NextChildByte to 2 so I was able to create a more child content type after that.
EDIT: I found afterwards this blog post. Looks like this script could have fix it for me. This would be the best option since updating the database is not a solution.
http://www.mattjimison.com/blog/2011/06/21/a-duplicate-content-type-found-error/
Cheers!
After struggling with this issue for a good while (the fixes mentioned here didn't work for me), I have managed to find an alternative way to fix it.
In my case this error was happening when trying to use a Site Template (classic templates).
Before saving the site as a template, I opened the site using SharePoint Designer, navigated to All files -> _cts folder and deleted the content types from the site level. In my case there was already a content type with the same name in the Site collection level.

Resources