Im using sitecore 8.1 and I have a bucket that accepts a bucketable template. When I right-click the bucket and add an item based on that template, then it gets added to bucket using the default bucket hierarchy (as expected).
The issue is the content editor doesn't display the added item. It in fact displays the parent folder item i.e. /sitecore/content/x/Resources/Document Repository/2016/04/25/20/35
How can I change this so that the added item gets displayed and not its parent?
Thanks
If viewing buckets is enabled (view tab in the ribbon) then the content editor usually loads the created (bucketable) item. Have you reviewed the log files for possible errors? Have you maybe changed / patched the original Sitecore.Buckets.config file?
Related
I have multiple tables in BigQuery. I also have a tag template.
Is there a way to attach this tag template and fill the details programmatically with python to any table using the google.cloud.datacatalog?
tag = datacatalog.Tag()
tag.template = 'my_project_id.my_tag_template'
data_sources_field = datacatalog.TagField()
data_sources_field.string_value = 'Test_data_source'
tag.fields['data_sources'] = data_sources_field
datacatalog_client.create_tag(parent=my_table_entry.name,
tag=tag)
I get the following error -
PermissionDenied: 403 Permission denied on resource project my_project_id.my_tag_template.
The service account has 'project editor' role.
The issue was caused by the way the tagTemplate was called.
tag.template = 'projects/<project-id>/locations/<location>/tagTemplates/<template_id>'
Calling like above solved the issue.
If you want to create a tag template and attach a tag along with the values to the BigQuery table programmatically using Python API, refer to this quickstart.
If you are facing the same error (PermissionDenied : 403 Permission denied on resource project) as the OP, refer to the answer by the OP himself.
If you want to do the same through console, follow the below steps. For more information, refer to this doc.
Create a new tag template by navigating through Data Catalog -> Tag templates -> Create tag templates (Provide the “Template id”, “Location” and “Fields” based on your requirements and click create)
To attach a tag to a table in your dataset, navigate through Data Catalog -> Search, enter your dataset/table name in the Search box, then click search. From the results, select your table which you want to attach a tag.
After selecting the table, click “Attach Tags” and select your table name in “Choose what to tag”, then choose the tag template (which you have newly created) in “Choose the tag templates” and add values based on the display name and type as per your requirement in “Fill in tag values” and click save. The “Attach Tags” page will appear as shown below:
You can check the created tag with values under the “Tags” on the table page in Data Catalog as below:
According to Object Key and Metadata - Amazon Simple Storage Service, Amazon S3 buckets have a flat structure, meaning that an object created in a folder folder1/object1.txt would have the key folder1/object1.txt. However there is a discrepancy between the docs and what the AWS console shows.
When you click on the checkbox next to the object1.txt the properties panel slides in from the right and there is a key property under the overview section that reads key object1.txt. This according to the documentation is incorrect. Additionally if you click on the object link the new overview screen shows a different panel in which they key is folder1/object1.txt.
My Question is: What is the reason for this discrepancy and which panel is displaying the correct information? Is the key represented in the first panel something entirely different than the s3 object key?
The documentation is correct.
However, since humans enjoy the concept of folders and directories, Amazon S3 provides something called a Common Prefix, which is similar to the concept of a path.
When listing the contents of a bucket, paths (effectively keys without the final "object name") are provided are a list of CommonPrefixes. The AWS Management Console uses this to allow users to step through folder hierarchies.
However, the Key of all objects include their full path.
Here's something interesting... if a user clicks "New Folder" in the Amazon S3 management console, then a zero-length file is created with the name of the folder. This causes the folder to appear as a common prefix, even if no files exist "inside" the folder.
Correct object key would obviously be folder1/object1.txt.
As for the reason for the discrepancy I'd sign it off to a poor UI decision.
We have a content folder that has been turned into a bucket to manage the sheer number of items it will contain. The bucket items are published via a workflow and the bucket items are left to be published by the scheduled publish that runs periodically.
For the most part, all works well and fine with regards to the bucket item creation and editing process. But the bucket folders refuse to publish some times. After inspecting the bucket folders, we found that the bucket folders have Version 1 created but when you go to check that version it just lists 'Modified [Not set] by'. This causes the folder items to not be registered in the PublishQueue table and not get published.
The simplest way to fix this is by right-clicking on the folder item, click on Rename and then just click OK on the popup message. This updates the version message to the propery modified by and date values. And also the publish process picks it up.
Has anyone come across this issue or has any tips for us to try?
This is a know bug.
1) Place the attached Sitecore.Support.413254.dll file to the Webiste\bin folder.
2) Backup the "Sitecore.Buckets.config" file from the Website\App_Config\Inculde folder.
3) In the "Sitecore.Buckets.config" file , change the following processor:
<publish>
<!-- Extending publish pipeline to always add bucket folders to the queue when a bucketed item is being published -->
<processor patch:after="processor[#type='Sitecore.Publishing.Pipelines.Publish.AddItemsToQueue, Sitecore.Kernel']" type="Sitecore.Buckets.Pipelines.Publish.AddBucketFoldersToQueue, Sitecore.Buckets" />
</publish>
with this processor:
<publish>
<!-- Extending publish pipeline to always add bucket folders to the queue when a bucketed item is being published -->
<processor patch:after="processor[#type='Sitecore.Publishing.Pipelines.Publish.AddItemsToQueue, Sitecore.Kernel']" type="Sitecore.Support.Buckets.Pipelines.Publish.AddBucketFoldersToQueue, Sitecore.Support.413254" />
</publish>
Here is the dll:
https://www.dropbox.com/s/thr94mqi8967dab/Sitecore.Support.413254.dll?dl=0
By default in Sitecore when we import Items in Bucket they are created in hierarchy by either the GUID or the Datetime of creation.
Is there a way to create a flat structure in the Bucket and have no hierarchy?
Would having a flat bucket structure affects the way Sitecore search for bucket works?
The whole idea of using the item buckets is to avoid having a large number of items physically stored under the same parent item. However, you can still have a flat list of items if you want by setting the BucketConfiguration.BucketFolderPath to blank or a given name. This key is located in the /App_Config/Include/Sitecore.Buckets.Config.
I copied here the comments written above the BucketConfiguration.BucketFolderPath settings:
This setting determines the folder structure that is created in the
content tree. Edit this setting to change the folder structure.
The format currently supports date formatting, names, for example, "Content Bucket" or blank. Blank creates a dummy called
"Repository".
I'm using Sitecore with DMS (Sitecore 7.2), and I'm setting up various controls on my layouts to pull content from different folders based on the users profile card. I'd like those folders to be "bucket" folders, since there'll be one folder for each profile card, and it'll be a bit unpleasant for authors to have to manually update all of these folders every time a new profile card is added.
The "Developers Guide to Item Buckets and Search" says:
by default, the items are organized according to the date and time of when the item was created, but this can be configured to use different behavior
Ideally I'd like to bucket my items on a field defined in a template that all of my "bucketable" item templates inherit from. I'll set that field to be a select dropdown from the list of profile cards.
I've found the Sitecore Autohaus demo with the Bucketing.GuidFolderPath class - looks like I need to define one of these classes with a GetFolderPath method? But then how do I tell my Sitecore bucket item that I want to bucket using that class?
You can indeed use a custom IDynamicBucketFolderPath and set that in the config (BucketConfiguration.DynamicBucketFolderPath), but that will change your default for all buckets.
You can define rules in sitecore to specify the folderstructure for a specific path/template/id/etc.
By default there are 3 rules: CreateDateBasedPath, CreateIDBasedPath and CreateItemNameBasedPath, but you can ofcourse add your own rules under /sitecore/system/Settings/Rules/Definitions/Elements/Bucketing/
You can change the bucketing strategy by two ways:
Using predefined bucketing rules. Navigate to item bucket settings stored at /sitecore/system/Settings/Buckets location and create a new rule (Bucketing Strategy: Item Creation Date) for resolving the bucket folder path.
Writing custom code for bucketing strategy. Write CustomBucketFolderPathResolver class which implements IDynamicBucketFolderPath interface and return folder path.
Detail information can be found at below post:
http://www.bugdebugzone.com/2014/07/configuring-sitecore-item-buckets-with.html
http://www.bugdebugzone.com/2014/07/configuring-sitecore-item-buckets-with_19.html