MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   FusionPro® VDP Server (API) (http://forums.pti.com/forumdisplay.php?f=8)
-   -   External JS updates not recognized by FP template in 9.3 (http://forums.pti.com/showthread.php?t=4050)

esmith January 19th, 2015 02:54 PM

External JS updates not recognized by FP template in 9.3
 
Prior to 9.3 I have been able to link to an external JS file for all my code with template rules used to call to these more detailed functions. If I made changes to the external file, I could simply update the JS file without having to re-collect the FP template -- a nice time saver for quick changes.

Since updating to 9.3, I am no longer able to make changes to this file and have the FP template recognize the changes on the next composition. Instead, I now have to collect the job again (despite nothing changing in the template itself) in order for the revised code to be applied.

Is PTI aware of this change? If so, is it intentional? I'm guessing that the Assets file may be to blame, but I don't have a way of reading it's contents. I am considering reverting backwards to re-gain this preferred functionality.

esmith January 19th, 2015 02:56 PM

Re: External JS updates not recognized by FP template in 9.3
 
Note that this is not a problem when composing locally. Local composition correctly "sees" changes to external JS. It is only when overwriting the external JS file on the FPS server that server-side composition is not recognizing the external changes.

Dan Korn January 20th, 2015 09:05 AM

Re: External JS updates not recognized by FP template in 9.3
 
How exactly are you using an "external JS file?" Are you calling the Load() function? Also, is the JS file marked as a resource and collected up with the job, or is it on a fixed path? Can you collect up an example that demonstrates this, or provide any other specific information as to how to reproduce the problem?

esmith January 20th, 2015 11:47 AM

Re: External JS updates not recognized by FP template in 9.3
 
Quote:

Originally Posted by Dan Korn (Post 16133)
Are you calling the Load() function?

Yes.
Code:

// Load external JS: local for preview; relative to template for web backend
var exjs = (FusionPro.Composition.isPreview) ? "/Users/cg138300/Desktop/_SSS/_js/sss.js" : FusionPro.ResolveFile("../_js/sss.js");
Load(exjs);

Quote:

Originally Posted by Dan Korn (Post 16133)
is the JS file marked as a resource and collected up with the job, or is it on a fixed path?

Fixed path, not a resource.
Quote:

Originally Posted by Dan Korn (Post 16133)
Can you collect up an example that demonstrates this, or provide any other specific information as to how to reproduce the problem?

I'll see if I can find/make time to create a generic example.

Dan Korn January 20th, 2015 02:20 PM

Re: External JS updates not recognized by FP template in 9.3
 
Quote:

Originally Posted by esmith (Post 16134)
I'll see if I can find/make time to create a generic example.

Okay, thanks. A couple more questions:
Quote:

Originally Posted by esmith (Post 16128)
Note that this is not a problem when composing locally. Local composition correctly "sees" changes to external JS. It is only when overwriting the external JS file on the FPS server that server-side composition is not recognizing the external changes.

What specific version of FusionPro is on the server? Your signature only notes the client Mac version.

Also, you say that, "I now have to collect the job again." So, you re-collect the job, and then what? Do you overwrite the entire job on the server, then re-compose?

Finally, when you say this:
Quote:

Originally Posted by esmith (Post 16134)
Code:

// Load external JS: local for preview; relative to template for web backend
var exjs = (FusionPro.Composition.isPreview) ?
    "/Users/cg138300/Desktop/_SSS/_js/sss.js" :
    FusionPro.ResolveFile("../_js/sss.js");
Load(exjs);

Fixed path, not a resource.

I guess I wouldn't classify a relative path like "../_js/sss.js" as a "fixed" path. I'm wondering if FusionPro isn't picking up the file you expect. What happens if you add this line to your rule?
Code:

Print("Found JS file: " + FusionPro.ResolveFile("../_js/sss.js"));


All times are GMT -7. The time now is 03:41 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.