Issue with browse and upload new thumbnail in the template of CQ 5.5 - aem

I have provided thumbnail image for my templates. The thumbnail has jcr:content with property as below
name jcr:data
type boolean
value view
On double click view we get a browse option to upload new image from file system. But on selecting an image and clicking "OK" button the window isn't closing, though the new image gets uploaded in the thumbnail. And thus we have to close it either by clicking the "cancel" button or the 'X' (close) button.
Any solution to fix the "OK" issue.
Thanks.

I think this is a bug in CQ, because I have the same problem. I don't think CRXDE Lite can handle uploading an image directly. I would recommend creating a new package with a filter for just that image (/apps/myproject/templates/htmlpage/thumbnail.png). Build the package and then download it. Extract the package and replace the image with the new thumbnail. Rezip the package and upload it to your CQ instance, then click the install button. This workaround will let you update the image.
There is also a way to directly access the JCR filesystem. In Mac OSX I open up Finder and hit CMD-K to connect to the CQ instance directly. Then I can just drop the new image in directly. I'm not sure what environment you're working in, so your mileage with this approach may vary.

Related

ModX Evo: TinyMCE wont insert image path into image URL in selector

This is occuring on ModX Evo 1.0.15.
When I try to select an image (or file) using TinyMCEs image selector I can upload and browse for the image but when I select it to place within my text nothing happens - the image path area remains blank.
Heres a video demonstrating what happens: https://www.youtube.com/watch?v=VSgTsyj9B6k&feature=youtu.be&hd=1
Does anyone know how to fix this?
Weird, never had that problem.
Did you try update / reinstall of Evo? (or only tinymce and kcfinder)
Are config paths correct?
Try testing in Firefox, It's possible it's related to Chrome. If it doesn't work in Firefox, Reinstall the plugin.
Clear your cache and try selecting the image.
For a temporary solution if this doesn't work, just type in the image name into the box 'images/imagename.jpg' (minus quotes)
Good Luck

CQ5 DAM asset: Not able to create thumbnail at renditions tab

When I upload an image to the DAM and generate renditions, I sometimes find that rendition's thumbnail is not able to be created.
I tried to take a look at http://localhost:4502/etc/workflow/models/dam/update_asset.html but I don't know which step generate the rendition's thumbnails. Is it possible to fix this?
The "Thumbnail creation" process step (part of the http://localhost:4502/cf#/etc/workflow/models/dam/update_asset.html) creates the thumbnail renditions of the uploaded Digital asset in DAM.
Its common to see that the original document does not have a thumbnail displayed in the DAM renditions console. As long as you are able to open up and view the original version of the document and the renditions in their respective consoles in DAM, I think you are good to go!
If you click on the original rendition, the file will open without any issue.
In order to avoid long loading times, if the image is more than 300KB of size then the document icon is shown instead of a full image in case of original rendition. Try uploading a file of less than 300KB in size and you can see the thumbnail in case of original rendition as well.
The rendition is getting generated fine, it is just not displayed on the UI. AEM 6 will be touch UI enabled and in the new UI, you will be able to see the rendition for "original" image as well.

JavaFX 2.2 generated image not shown after building jar-file

In my JavaFX Application I generate a barcode with barcode4j by Apache, save it as png image in the directory /data/images/ and embed it in a web page which is shown on a JavaFX WebView.
After generating the barcode I embend it into the webpage using the following Javascript-Code:
path = "file:/" + path.replace(/\\/gi,"/");
var barcodeElement = document.getElementById("productBarcode");
barcodeElement.setAttribute("src", path );
barcodeElement.style.display = "inline-block";
I use the absolute path C:\path\to\java-program\data\myimage.png and build a file-URL from it.
Using this in Eclipse works without any problems. But when I build my project and start it from my jar-file the image is not shown. But the problem is not, that the path is incorrect or that generating the picture does not work, so that there is some kind of "not found" error. The place where the image should be is just white with a light border around.
And now the strangest part: If you right click on the image and choose "open in new window" the image is shown!
Does someone has an idea about that?
Thank you very much in advance!
My understanding is that the WebView won't let a page loaded with one protocol access files using another one. This makes perfect sense when you load through http://, and forbid file://. Here, you're loading through jar:file:..., and the webview will only let you access jar:file:... resources (I just tried, I can access an image from another jar file, from the same jar file, but not from outside!).
This sounds very much like a bug to me.
One workaround mentioned here is to use "data:" URI (i.e. encode the image directly in the HTML file).

How to have image target new window or _blank using FPDF?

In my app the PDF gets opened in the web page and in the below example, when the users clicks on Logo.png it's getting redirected to FPDF site in the same page, but i want to open the link in the new window, instead of opening in the same window, so the users has the PDF opened.
$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
Yes I have tried some workarounds for this but its seem to not possible currently. But I have achieved this using ViewerJS.
Just display pdf using viewerjs(pdf js). Just put this line $('a').attr('target', '_blank'); after div.setAttribute('data-loaded', true); inside viewer.js file.
And you will find target blank. Hope this helps!
Sorry, I am pretty sure that this is not possible currently.

Images in Interface Builder when using MonoTouch

I'm new to MonoTouch and iPhone development. I have my images (PNG) in a resources folder in MonoDevelop, however if I want to set the image property for a button in Interface Builder, how do I do that? It's always a blank dropdown. Do I need to use XCode to access the XIB file and then somehow embed the button image file I'll need in it?
This is a known limitation of MonoDevelop and Interface Builder. To add images to an XIB in Interface Builder they must be part of an XCode project, which of course coming from MonoDevelop they're not.
To achieve what you're trying to do you will need to set the image via code, and ensure the build action of your image is set to Content. To do this, simply right click your image inside MonoDevelop, and select Build Action > Content.
On your view with the button on it, create an outlet in Interface Builder for your button, hook it up, then from code to set your image, you just need to use the .FromFile("path/name") method of UIImage.
UIImage buttonImage = UIImage.FromFile ("resources/image.png");
myButton.SetBackgroundImage (buttonImage,UIControlState.Normal);
That's off the top of my head, but I think that should do it.
You can manually set the image in Interface Builder, but it wont show up until run time. The image name can include a path, e.g. "images/settings.png".
All solutions given here are completely wrong and misleading. All you need to do, is place your images in the Resources folder (on the project root), and add your images to this folder. After adding files to this folder, mark all files and make sure their build action is set to BundleResource.
I also needed this to work, here is a workaround I found.
You need to create a dummy xcode project. Place it in the same folder as your project.
Add all your xib files and image files to that xcode project by dragging them in when the project is opened in xcode. Now you will be able to see the preview of the images.
The image files must be in the same folder as the project file and xcode must be opened with the dummy project while the interface builder is opened.
Not great - but solves the issue for now.
Here is a sample project I have created.
For this issue to be resolved on the MonoDevelop side - some inter-process communication code needs to be created, I think that a good starting point will be looking for "PBXProjectWatcherServerConnection-3.1.2" in google.