Using Veeva Vault, how do I connect to a Related Shared Resource? - css

I'm using Veeva Vault for a project, and I'm unable to get the Related Shared Resource option to work. I'm basically uploading an HTML5 page, and I want to link to a global css file.
This is the Help Guide - http://vaulthelp2.vod309.com/wordpress/applications/promotional-materials-edition/using-clm-integration/
In Veeva, I have a binder presenation, which houses all of my key messages. The key message structure looks like this:
myfilename.zip
myfilename
myfilename.html
myfilename-full.jpg
myfilename-thumb.jpg
assets
css
img
js
I used the Veeva CRM App to get them to display on the iPad. This works fine. I can see my presentation and all of the slides (key messages).
I created a shared folder that looks like this:
[shared]
mysharedname.zip
mysharedname
mysharedname-full.jpg
mysharedname-thumb.jpg
css
img
js
The shared folder is created by Veeva (according to this - https://crmhelp.veeva.com/doc/Content/Print-only_topics/CLM%20Content%20Creation%20Guide.pdf - pg. 70). In Veeva, I added the files as a slide using these options:
Name
Type (Slide)
Country
CLM Properties (Yes)
Product
Renditions
The link to the shared folder in my HTML5 file looks like this:
<link rel="stylesheet" href="../shared/css/main.css">
Once uploaded, I went to the myfilename slide, and checked the Related Shared Resource option, and selected the mysharedname slide. I performed a Force Full Refresh, and synced. The class I set in the mysharedname/css file does not display.
I've tried variations with folder names, added the shared file to the Binder, changed the path of the link to ../shared/mysharedname/css/main.css, etc. with no success.
I've used test.salesforce.com in the past to upload key messages and set shared files. However, I'm unfamiliar with how that's accomplished using Veeva Vault. I'm certain I'm either naming the files incorrectly, or not entering the key message correctly.
Any assistance is appreciated.
Thanks.

It turns out there were two issues. For some unknown reason, the file didn't post properly. Tech support couldn't determine the reason, but suggesting creating a new shared file - which worked!
Also, in posting the new shared file, I noticed the Distribution Package (zip file) keep "disappearing" in the upload process. So, I just re-attached it (in Veeva Vault - INFORMATION > Renditions).
Oh, and the shared file should be outside of the binder.

To link a shared resource in veeva vault please follow the rules for example
./shared/css/base.css
Shared zip structure should be
shared.zip css
base.css
shared_folder_structure
and you need to add the shared resource to the main file perimeter
parameter

Related

changing file names, how to?

I've created some forms following this approach:
iron g:template cars/create_car
and the following files were created:
create_car.css
create_car.html
create_car.js
Easy question - if I want to change the name of the files where else do I have to update to keep my changes in sync with the rest of the application?
Thank you!
Mark
You won't be out of sync by changing file's name.
The only things which would change is the file load order, according to the documentation:
HTML template files are always loaded before everything else.
Files beginning with main. are loaded last
Files inside any lib/ directory are loaded next
Files with deeper paths are loaded next
Files are then loaded in alphabetical order of the entire path
On your case It's wouldn't probably cause any issue, feel free to test.

Upload file with CMIS Service on st:site

I have been uploading files to Company Home pretty easily with this url:
http://myhost.com:8080/alfresco/s/api/path/workspace/SpacesStore/app:company_home/children
Now I am trying to upload to a folder within a site
http://myhost.com:8080/alfresco/s/api/path/workspace/SpacesStore/app:company_home/st:sites/cm:mysite/children
And keep getting this
Cannot find object for NodePathReference[storeRef=workspace://SpacesStore,path=app:company_home/st:sites/cm:mysite]
Am I missing a special way to declare the path of a site?
i'm not sure how you are uploading to that path but i suppose you need to go into 'documentLibrary' of the site
http://myhost.com:8080/alfresco/s/api/path/workspace/SpacesStore/app:company_home/st:sites/cm:mysite/cm:documentLibrary/children
I found out that there are 6 webscripts related to file manipulation, and it seams each one takes the path in a different way.
I ended up using
http://example.com:8080/alfresco/s/cmis/p/Sites/mySite/Test/children
This particular service it takes Display Names as path segments, and the p itself represents the Company Home segment
I also obtained the same results with this one
http://example.com:8080/alfresco/s/cmis/s/workspace:SpacesStore/i/2aa692bd-0dab-4514-a629-ad36382189f2/children
Which as you can see takes nodeRef Ids as parameter.

Laravel/blade caching css files

I am working on Nginx server, with PHP-FPM. I installed Laravel 4.1 and bootstrap v3.1.1., and here is the problem. For the last 30 minutes, I have been trying to change a css rule that I first declared to check boostrap.
.jumbotron{
background: red;
}
The first time it worked. The jumbotron container was red. So, I removed that css value and started working, but still no matter which browse I use, the container is red. I even checked the css file through the Google Chromes inspection tool, and it is showing me that first value when jumbotron had a background:red. I deleted the css file and renamed it and add new styles, I configured chrome not to cache pages. But Still the same value. I'm convinced now, that Laravel has kept a cache of the first style declaration.
Is there any way to disable this at all?
General explanation
When you access a Laravel Blade view, it will generate it to a temporary file so it doesn't have to process the Blade syntax every time you access to a view. These files are stored in app/storage/view with a filename that is the MD5 hash of the file path.
Usually when you change a view, Laravel regenerate these files automatically at the next view access and everything goes on. This is done by comparing the modification times of the generated file and the view's source file through the filemtime() function. Probably in your case there was a problem and the temporary file wasn't regenerated. In this case, you have to delete these files, so they can be regenerated. It doesn't harm anything, because they are autogenerated from your views and can be regenerated anytime. They are only for cache purposes.
Normally, they should be refreshed automatically, but you can delete these files anytime if they get stuck and you have problems like these, but as I said these should be just rare exceptions.
Code break down
All the following codes are from laravel/framerok/src/Illuminate/View/. I added some extra comments to the originals.
Get view
Starting from Engines/CompilerEngine.php we have the main code we need to understand the mechanics.
public function get($path, array $data = array())
{
// Push the path to the stack of the last compiled templates.
$this->lastCompiled[] = $path;
// If this given view has expired, which means it has simply been edited since
// it was last compiled, we will re-compile the views so we can evaluate a
// fresh copy of the view. We'll pass the compiler the path of the view.
if ($this->compiler->isExpired($path))
{
$this->compiler->compile($path);
}
// Return the MD5 hash of the path concatenated
// to the app's view storage folder path.
$compiled = $this->compiler->getCompiledPath($path);
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($compiled, $data);
// Remove last compiled path.
array_pop($this->lastCompiled);
return $results;
}
Check if regeneration required
This will be done in Compilers/Compiler.php. This is an important function. Depending on the result it will be decided whether the view should be recompiled. If this returns false instead of true that can be a reason for views not being regenerated.
public function isExpired($path)
{
$compiled = $this->getCompiledPath($path);
// If the compiled file doesn't exist we will indicate that the view is expired
// so that it can be re-compiled. Else, we will verify the last modification
// of the views is less than the modification times of the compiled views.
if ( ! $this->cachePath || ! $this->files->exists($compiled))
{
return true;
}
$lastModified = $this->files->lastModified($path);
return $lastModified >= $this->files->lastModified($compiled);
}
Regenerate view
If the view is expired it will be regenerated. In Compilers\BladeCompiler.php we see that the compiler will loop through all Blade keywords and finally give back a string that contains the compiled PHP code. Then it will check if the view storage path is set and save the file there with a filename that is the MD5 hash of the view's filename.
public function compile($path)
{
$contents = $this->compileString($this->files->get($path));
if ( ! is_null($this->cachePath))
{
$this->files->put($this->getCompiledPath($path), $contents);
}
}
Evaluate
Finally in Engines/PhpEngine.php the view is evaluated. It imports the data passed to the view with extract() and include the file with the passed path in a try and catch all exceptions with handleViewException() that throws the exception again. There are some output buffering too.
Same issue here. I am using VirtualBox with Shared Folders pointing to my document root.
This pointed me in the right direction:
https://stackoverflow.com/a/26583609/1036602
Which led me to this:
http://www.danhart.co.uk/blog/vagrant-virtualbox-modified-files-not-updating-via-nginx-apache
and this:
https://forums.virtualbox.org/viewtopic.php?f=1&t=24905
If you're mounting your local dev root via vboxsf Shared Folders, set EnableSendFile Off in your apache2.conf (or sendfile off if using Nginx).
For what it's worth and because this answer came up first in my google search...
I had the same problem. The CSS and JS files wouldn't update. Deleting the cache files didn't work. The timestamps were not the problem. The only way I could update them was to change the filename, load it directly to get the 404 error, and then change the name back to the original name.
In the end the problem was not related to Laravel or the browser cache at all. The problem was due to NginX using sendfile which doesn't work with remote file systems. In my case, I was using VirtualBox for the OS and the remote file system was vboxsf through Guest Additions.
I hope this saves someone else some time.
In Laravel 5.8+ you can use so:
The version method will automatically append a unique hash to the filenames of all compiled files, allowing for more convenient cache busting:
mix.js('resources/js/app.js', 'public/js').version();
After generating the versioned file, you won't know the exact file name. So, you should use Laravel's global mix function within your views to load the appropriately hashed asset. The mix function will automatically determine the current name of the hashed file:
<script src="{{ mix('/js/app.js') }}"></script>
full document: https://laravel.com/docs/5.8/mix

'The class exists in both dlls' .NET issue

I cannot deploy my asp.net 4.5 website because I am getting multiple dreaded "The type 'myClassX' exists in both C:\Users\Me\...\whereItsSupposedToBe\ and C:\Users\Me\AppData\Local\Temp\Temporary ASP.NET Files\root\1randomname\_shadow\2randomname\3randomname\App_web_myClassX.cs.4acf3bb.nommceoi.dll errors.
There are three files involved. MyClasses.cs contains definitions for MyClassB, MyClassC, MyClassD. Page1.aspx and page2.aspx include in their <%page %> tag a src attribute for MyClasses.cs.
I have so far done the following:
cleaned the solution and project
shut down VS12
deleted the root\1randomname directory and emptied the recycling bin
restarted the #^$#ing computer
deleted the offending files, cleaned and built, created new files and
renamed all involved filenames, classes and namespaces (oh yeah, they
all used to be'myOGClassA'....)
introduced dummy variables hoping that would change the dll
deleted the bin and obj directories
added the batch="false" attribute to the compilation element of the
web.config file as mentioned here: ASP.Net error: "The type 'foo' exists in both "temp1.dll" and "temp2.dll"
Something makes me wonder if having two of the aspx files having references to the same src file has something to do with it. But in all the blogs and SO posts Iv seen so far that would result in the conflicts both coming from the temp directories.
Head starting to hurt... Any suggestions?
I have "fixed the problem" but I am not sure why it is fixed.
To recreate the problem:
Create a New Project -> ASP.NET Web Forms Application.
Create a new folder ("Search").
Add the three files from the demo project zip found at Static-Site Search Engine with ASP.NET/C# by craigd (Searcharoo version 1). These files are Searcharoo.cs, SearcharooCrawler.aspx, and Searcharoo.aspx.
Take a look at SearcharooCrawler.aspx. At this point I get the 'exists...' errors. If you still do not see errors, view the project in the browser. The errors seem to appear as you are looking at the .aspx files in VS12.
To fix:
Create a new folder ("Happy_App")
Move Searcharoo.cs to the new Happy_App. This fixes the 'exists...' errors, but now Searcharoo.cs 'can't be found' so...
Delete the 'Src="Searcharoo.cs"' attribute from the top <%paging...%> tag in both aspx files. I believe that this Src attribute is no longer used in ASP.NET 4.5 (I may be wrong)
View in browser and navigate to the Search/SearcharooCrawler page. No errors! (need to add a few properties in web.config to get the searcharoo demo working, but thats not the point of this post...)
But the truly weird part - I found that after moving the Searcharoo.cs file to the Happy_App folder I could move it back the original Search folder without any 'Exists' problems!
Why??
If anyone has an explanation that would be awesome. But for now I'm happy I could get a resolution without sacrificing a small animal...

How can I programmatically add build files to Xcode4?

I've been trying to figure out how to programmatically add files to an Xcode4 project and it seemed like AppleScript would be the way to go, however I'm running into "missing value" errors.
Here's the code I've got:
tell application "Xcode"
set theProject to first project
set theTarget to first target of theProject
set theBuildPhase to compile sources phase of theTarget
tell first group of theProject
set theFileRef to make new file reference with properties {full path:"/Users/jeff/Projects/XcodeTest/XcodeTest/MyViewController.h", name:"MyViewController.h", path:"XcodeTest/MyViewController.h", path type:group relative}
add theFileRef to theProject
end tell
--tell theBuildPhase to make new build file with properties {build phase:theBuildPhase, name:"MyViewController.h", file reference:theFileRef, target:theTarget, project:theProject}
end tell
I've tried the commented-out line instead of the add-command as well, but that doesn't work either (I get "missing value").
The 'add' error is:
error "Xcode got an error: file reference id \"251AD3431432472E006E300F\" of Xcode 3 group id \"251AD32C14324645006E300F\" of project \"XcodeTest\" of workspace document \"XcodeTest.xcodeproj/project.xcworkspace\" doesn’t understand the add message." number -1708 from file reference id "251AD3431432472E006E300F" of Xcode 3 group id "251AD32C14324645006E300F" of project "XcodeTest" of workspace document "XcodeTest.xcodeproj/project.xcworkspace"
The "make new reference" does add the file to the list of files in Xcode, but I also need it to be added to the project target so that I can add actions and outlets to the file from Xcode w/o having to first check the checkbox to add it to the "target membership".
I ended up sending this question to the devs on the xcode developer list and the response I got was effectively "you can't".
This appears to be completely broken in Xcode4, but I've seen a project that does it. I think what they are doing is parsing and modifying the "project.pbxproj" file directly. (this file is hidden inside the xcodeproj bundle)
The file is a GUID soup, but once you look at it for a while it seems possible to safely modify it, especially if you are only adding stuff.
Edit:
Found this stackoverflow answer that might help.
Tutorial or Guide for Scripting XCode Build Phases
There is a poorly documented user defined build setting that can be added. Files can be both excluded and included from compilation
Go to your target's Build Settings > Tap the + button > Add User-Defined Setting
The key is either INCLUDED_SOURCE_FILE_NAMES or EXCLUDED_SOURCE_FILE_NAMES
The value is a space separated list of file paths
See reference:
http://lists.apple.com/archives/xcode-users/2009/Jun/msg00153.html

Resources