Open sitecore media library programmatically Issue - sitecore

I have tried this solution:
Open sitecore media library programmatically from asp.net button click
but this is not working for me. This gives a JavaScript error for .ascx file code mentioned in answer.
This statement: Sitecore.PageModes.ChromeManager.postRequest
I am using Sitecore 6.3, included sitecore.js file. But get the script error the PagesMode ChromeManager property caught for undefined.
Also tried to use
scForm.postRequest("", "", "", 'contentimage:open(id=FIELD1377303253)');
but this certainly wont issue the custom MediaBrowser command created for original solution.

Try to use the Sitecore.Shell.Framework.Windows.RunApplication() function. You need to pass the Media Library itemId as parameter in the RunApplication() method.
You can get the Media Library ItemId in the Core Database at the following path: /sitecore/content/Applications/Content Editor/Applications/MediaLibraryForm
Thanks

Related

Info.plist added but Xcode still crashing

I'm setting up a project utilizing OpenCV and Xcode and I want to open up the webcam using VideoCapture. I have added my own Info.plist file (as a command-line project in C++ doesn't have an Info.plist) and I have added it to the project under targets/general/identity. My info.plist is verified as OK from the command "plutil Info.plist".
I also have the "Pre-Process Info.plist" tag under "Packaging" changed to "yes". However, I still get this error:
"This app has crashed because it attempted to access privacy-sensitive
data without a usage description. The app's Info.plist must contain
an NSCameraUsageDescription key with a string value explaining to the
user how the app uses this data."
I have tried many StackOverFlow links and they have all failed, including this one: Accessing webcam in Xcode with OpenCV (C++)
If I don't add the Info.plist file to finder (the link at the bottom of the link), I get the same error.
When I add it to finder along with the executable, I get this error along with the previous error:
"There was an error parsing the Info.plist for the bundle at URL"
Please let me know how I can fix this. Thank you so much for your time.
You need to have some text (Usage Description) in Info.plist for key "NSCameraUsageDescription". Otherwise, the app will crash when app access Camera. Please see the snapshot below.
Hope it helps. Otherwise, please let us know.

Detect navigator inside WebExtension's manifest.json

I am currently working on a WebExtension and I have a small problem. On my Firefox browser I'm able to import and run my work without any error/warning. However with Google Chrome I have a big warning about a feature not implemented (the browser_style property of manifest.json key options_ui).
I'd like to create something like an if statement based on the navigator name to not set this property on Chrome but keep it on Firefox.
Here is the part of my manifest.json:
"options_ui": {
"page": "contents/settings.html",
"browser_style": true
},
And here is what I'd like to have (not working):
"options_ui": {
"page": "contents/settings.html",
if (options_ui.browser_style) {
"browser_style": true
}
},
Any ideas on how to create a condition like this in a manifest.json file?
As Daniel Herr implied in a comment, the manifest.json file is straight JSON formatted data. JSON has no capability to run code. There is no possibility to dynamically define properties within your manifest.json file. You have 2 options:
Live with the warning(s).
Both Chrome and Firefox have valid properties defined for manifest.json files which the other does not support. Both show warnings when there are unsupported properties. These are only warnings and do not cause the browser to prevent the extension from running. Chrome prominently shows these in chrome://extensions/. Firefox shows them in the Browser Console (Ctrl-Shift-J, or Cmd-Shift-J on OSX).
Have a separate manifest.json file per browser.
This adds some complexity to your build/development process, but will allow you to eliminate these warnings in each browser.
Note: Even if you don't submit different manifest.json files to Google (Chrome Web Store - Extensions) and Mozilla (AMO), by the time the extension package is distributed to the user, the manifest.json files and other contents of the extension package will be different, as the process of going from submission to distribution results in that file being modified and/or additional files being added to the extension package.

Zurb foundation 6 , what-input.min.js file functionality

Id like to know the relevance of what-input.min.js include in Zurbs foundation-6 framework , in the js/vendor directory , this is because i keep getting an 404 not found error not loading while running the site , ... js/vendor/jquery.min.map file , is there any connection ?
You don't need the .map file which is used to map a minified file back to the original. It is available for download from jquery's site. Source maps are can be ignored in inspector settings which makes sense when you don't plan on debugging minified javascript files
It is unrelated to the source map file 404 but what-input.min.js is a JS library "to watch for mouse, keyboard and touch events"
They have a github page with more documentation: https://github.com/ten1seven/what-input
and a demo:
https://ten1seven.github.io/what-input/
"Tab, click or tap the links and form controls to see how What Input allows them to be styled differently"
I had this exact same problem on every site when using JointsWP with Foundation 6 framework. I finally just figured it out. I turned off css source mapping and still received the error. It turns out that it wasn't lying to me and the js file really does not exist where it is trying to load it from:
/vendor/what-input/what-input.min.js
But it is under the dist folder within that same directory. So if you find your enqueue-scripts.php file where the what-input.min.js is loaded, you can fix the directory path to:
/vendor/what-input/dist/what-input.min.js
And no more 404!

Cannot save file in WebStorm 9

I have been using the same workflow for months to add a new page in my ASP .NET site, but all of a sudden I am getting problems with trying to save a .ascx file inside of WebStorm.
I created the .ascx page in VS and then saved it. I then go over to WebStorm to start developing and I cannot save any of these new files. I get this error:
Following errors occurred on attepmt to save files:
C:\...\Management\Management.ascx___jb_bak___ (Access is denied)
I don't get what this file is and why it can't be saved... The jb makes it seem like a JetBrains file, but this file doesn't actually exist in the filesystem. All the other files I have had work just fine. Its just this new file all of a sudden.
What does this error even mean.. there is no valuable information
This error happened to me everytime I used Nodemon to start Webpack on a separate process. The problem was fixed by disabling "Safe write" in "Settings", as VyvIT suggested.
Hello to Developers using Jetbrains products!
I had this problem today and I think it was for the webstorm but I check my E: drive that I was developing on.
The problem was with my hard drive that changed to read-only.
I changed my drive to C and it solved.
Check your drive that you are using. That might be the problem.
You need to change your security options for user in Windows:
Right Click
The Folder > Properties > Security Tab
Click on
Edit to change Permissions > Select User

JFolder: :folder: Path is not a folder. Path:

I'm receiving the following error JFolder: :folder: Path is not a folder. Path: (with no path) when i create a menu item based off a K2 item. Its a fresh install with only k2, Gantry Framework (with throws the same error on install), a template installed, and a few items created...
As you see from the tag its Joomla! version 2.5.14. The PHP allow_url_fopen setting is disabled. This setting must be enabled for the updater to work.
(this is because i'm using Yahoo Small Business and from my understanding they don't allow customization of php settings and i'll never use them again after my year is up).
I've seen the issues on temp and logs and they are both ./logs or ./tmp
The template also looks pretty messed up but works fine on another site i have.
Other than that its all pretty new. Anyone have a work around or fixes for what i'd doing?
Switch to a host that is set up to run Joomla. All of your errors are server configuration related.