Crafter CMS Rollback to default Thumbail - crafter-cms

I have a page with a thumbnail and I want to remove it and go back to the default image.
I have this values in the config.xml of the content-type
<previewable>true</previewable>
<noThumbnail>false</noThumbnail>
<image-thumbnail>image.jpg</image-thumbnail>
Then I change it to the one I have before
<previewable>true</previewable>
<noThumbnail>true</noThumbnail>
<image-thumbnail></image-thumbnail>
After this, all I got is a broken image link. I don't see the default preview image when I try to create a new content type.
I'm working on 2.5.x on alfresco as my content repository. I did the changes trough Alfresco Share
Am I missing something to pick the change?

Did you try:
admin console -> configuration -> click on “clear cache”.
See attached image.

Related

NSBluetoothPeripheralUsageDescription missing, but present

After successful upload I get:
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.
This is in the .plist:
NSBluetoothPeripheralUsageDescription 'MyApp' would
like to use Bluetooth
What is here wrong? In other App's it was working.
The problem was, that there were two .plist files in the project directory.
The used .plist file is defined here: "TARGETS", "Build settings", "Packaging", "INFOPLIST_FILE".
find the info.plist file of your project and add the NSBluetoothPeripheralUsageDescription key the value it is string whatever you like. this feature is request on iOS 10.enter image description here

How to create single page application in liferay 7?

Can anyone share some detailed info on how to create a Single Page Application (SPA) in Liferay 7 using SennaJS.
I could't found any documentation on How to create SPA in Liferay 7.
It comes by default, except if you unset the following property:
javascript.single.page.application.enabled=true
BTW, it is rather annoying in dev instances, as it takes a while to load pages in the first access, sometimes you even need to reload the page. Also, be aware, in some especial cases, some applications might break, normally due to code that counts with page reloads to function properly.
you can even create it in 6.2 by using the following code.
// initializing senna
var app = new senna.App();
// Set links selector for navigations
app.setLinkSelector(".senna-link");
// set basic path of liferay site
app.setBasePath('/web/spa-demo/');
// Id of DOM element which will be replaced from
// next page request
// using content div - default in liferay theme
app.addSurfaces('content');
// define routes for all the navigation links
// route link = Base path + page link
app.addRoutes([
new senna.Route('home', senna.HtmlScreen),
new senna.Route('second', senna.HtmlScreen),
new senna.Route('third', senna.HtmlScreen),
]);
Thing which you need to take care of, if it is SPA, then all the events need to be bound first i.e. delegate as there is not going to be page refresh.
i.e things like document.getReady is only going to be called once.
Whatever the portlet you are going to create and deploy with Liferay SDK/Workspace OR any compatible liferay plugin it will be SPA by default.
No need to do any coding on top of it.

How to Upload images from local folder to Sitecore

`webClient.UploadFile("http://www.myurl.com/~/media/DCF92BB74CDA4D558EEF2D3C30216E30.ashx", #"E:\filesImage\Item.png");
I'm trying to upload images to sitecore using webclient.uploadfile() method by sending my sitecore address and the path of my local images.But I'm not able to upload it.I have to do this without any API's and Sitecore Instances.
The upload process would be the same as with any ASP.net application. However, once the file has been uploaded you need to create a media item programtically. You can do this from an actual file in the file system, or from a memory stream.
The process involves using a MediaCreator object and using its CreateFromFile method.
This blog post outlines the whole process:
Adding a file to the Sitecore Media Library programatically
If you're thinking simply about optimizing your developer workflow you could use the Sitecore PowerShell Extensions using the Remoting API as described in this this blog post
If you want to use web service way than you can use number of ways which are as follows:
a) Sitecore Rocks WebService (If you are allowed to install that or it is already available).
b) Sitecore Razl Service(It is third party which need license).
c) Sitecore Powershell Remoting (This needs Sitecore PowerShell extensions to be installed on Sitecore Server).
d) You can also use Sitecore Service which you can find under sitecore\shell\WebService\Service.asmx (But this is legacy of new SitecoreItemWebAPI)
e) Last is my enhanced SitecoreItemWebAPI (This also need SitecoreItemWebApi 1.2 as a pre-requisite).
But in end except option d you need to install some or other thing in order to upload the image using HTTP, you should also know the valid credentials to use any of above stated methods.
If your customers upload the image on the website, you need to create the item in your master database. (needs access and write right on the master database) depend on your security you might consider not build it with custom code.
But using the Sitecore webforms for marketers module With out of the box file upload. Create a form with upload field and using the WFFM webservices.
If you dont want to use Sitecore API, then you can do the following:
Write a code that uploads images into this folder : [root]/upload/
You might need to create folder structure that represent how the images are stored in Sitecore, eg: your images uploaded into [root]/upload/Import/ will be stored in /sitecore/media library/Import
Sitecore will automatically upload these images into Media library
Hope this helps
Option: You can use Item Web API for it. No reference to any Sitecore dll is needed. You will only need access to the host and be able to enable the Item Web API.
References:
Upload the files using it: http://www.sitecoreinsight.com/how-create-media-items-using-sitecore-item-web-api/
Enable Item Web Api: http://sdn.sitecore.net/upload/sdn5/modules/sitecore%20item%20web%20api/sitecore_item_web_api_developer_guide_sc66-71-a4.pdf#search=%22item%22
I guess that is pretty much what you need, but as Jay S mentioned, if you put more details on your question helps on finding the best option to your particular case.
private void CreateImageIteminSitecore()
{
filePath = #"C:\Sitecore\Website\ImageTemp\Pic.jpg;
using (new SecurityDisabler())
{
Database masterDb = Sitecore.Configuration.Factory.GetDatabase("master");
Sitecore.Resources.Media.MediaCreatorOptions options = new Sitecore.Resources.Media.MediaCreatorOptions();
options.FileBased = true;
options.AlternateText = Path.GetFileNameWithoutExtension(filePath);
options.Destination = "/sitecore/media library/Downloads/";
options.Database = masterDb;
options.Versioned = false; // Do not make a versioned template
options.KeepExisting = false;
Sitecore.Data.Items.MediaItem mediaitemImage = new Sitecore.Resources.Media.MediaCreator().CreateFromFile(filePath, options);
Item ImageItem = masterDb.GetItem(mediaitemImage.ID.ToString());
ImageItem.Editing.BeginEdit();
ImageItem.Name = Path.GetFileNameWithoutExtension(filePath);
ImageItem.Editing.EndEdit();
}
}

How can you set the swagger path in servicestack?

By default the documentation generated by swagger sits at /swagger-ui is there a simple mechanism to change this path to something more user defined such as /documentation?
The /swagger-ui/ and /swagger-ui-bootstrap/ paths are hard-coded to match the \swagger-ui and \swagger-ui-bootstrap folders and cannot be changed.
You could create a new Service or filter and redirect to them.
You can change the actual folder path from /swagger-ui/ to /documentation/. (make sure to search for the old swagger-ui string in the rest of the project and update the references where it makes sense, i think just in the index.html file)
Optionally, when registering your metadata plugins(if enabled) - you may want to update the Swagger link on the metadata page, which can be done by adding a link to the metadata swagger plugin
via appHost.GetPlugin()
.AddPluginLink("documentation/", "Swagger UI");

TYPO3: extension with both backend module and frontend plugin

I am trying to create an extension ('XML Uploader') with a backend module and a frontend plugin also.
The backend module will be used for managing xml files (upload, validate against a DTD), and the frontend plugin should be used for displaying the uploaded xmls.
The problem is with the frontend part:
I followed
the basic extension tutorial - added a new page, created a content element of type 'Insert plugin' - but when trying to add a new record, the type 'XML Uploader' does not appear in the list of new record types. Moreover, the changes made to class.tx_xmluploader_pi1.php have no effect.
So how should I work with the frontend plugin? Or would it be better to create a separate extension instead?
Any help would be very much appreciated.. Thank you.
When creating your table with the extension kickstarter you must check the "Allowed on pages:" checkbox to allow records from this table to be created on regular pages.
If your changes have no effect, it could be that the page is cached by typo3. In that case you can clear or disable the cache with the admin panel or in the page configuration menu.
You have to include the static template of your extension (I presume you used the kickstarter or extension_builder):
go to the your template, in the object browser you should see something like:
plugin.tx_xmluploader_pi1 = USER
if you can't find it, edit your template (edit/modify => edit whole template record) and add your extension template in the tab 'Includes'
Additionally, check your ext_localconf.php for the line
t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_xmluploader_pi1.php', '_pi1', 'list_type', 0);
This is where your FE plugin is being registered.

Resources