What would cause PROCESS 4D TAGS to "not work"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What would cause PROCESS 4D TAGS to "not work"

4D Tech mailing list
PROCESS 4D TAGS experts!


I was working on an image viewer involving a local html file and using
PROCESS 4D TAGS to substitute a URL with the source image from a remote
system. I was working on a local copy of our application (4D v15.4, Mac OS
10.11.6) to develop the viewer before moving the code into our development
server (4D Server v15.4). I found that PROCESS 4D TAGS was not substituting
the process variables for the tags in the template.


I wrote a small test to see that PROCESS 4D TAGS was working as expected.


C_TEXT($tText;$tFinal)

C_TEXT(tVar)

tVar:="You messed up!"

$tText:="<!--#4DTEXT tVar-->"

PROCESS 4D TAGS($tText;$tFinal)   -->$tFinal should now be "You messed
up!"


This failed in my local copy.


I created a new fresh database and inserted this code. Works.

I connected to the development server, created a new test method, inserted
the code. Works.


I started the local copy of our application, created a new test method,
inserted the code. NO WORKIE.

I ran the local copy through MSC and verified the structure. NO WORKIE.


Puzzling. Any ideas or conflicts I should be looking for? Cached or corrupt
files that should be cleared?


If you've got a quick reply. Please cc me in your posting as I am a digest
subscriber. Thanks.


----------------------------------------------------------------------------
------------------------

Edgar Hammond                                    
[hidden email]

Quest Information Systems

----------------------------------------------------------------------------
------------------------

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What would cause PROCESS 4D TAGS to "not work"

4D Tech mailing list
Try your test using process variables, not local variables.  PROCESS 4D TAGS was changed as of version 14 so that it had to use process variables (at least in Interpreted mode).

> Compatibility note: In previous versions of 4D, local variables defined in the calling context could be accessed in the PROCESS 4D TAGS execution context in interpreted mode. Beginning with 4D v14 R4, this is not the case anymore.

So your test method would be:

C_TEXT(vtText;vtFinal)

C_TEXT(tVar)

tVar:="You messed up!"

vtText:="<!--4Dvar tVar-->"

PROCESS 4D TAGS(vtText;vtFinal)
ALERT(vtFinal)

__

Ron Rosell
President
StreamLMS

> On May 23, 2017, at 2:07 PM, Ed Hammond via 4D_Tech <[hidden email]> wrote:
>
> PROCESS 4D TAGS experts!
>
>
> I was working on an image viewer involving a local html file and using
> PROCESS 4D TAGS to substitute a URL with the source image from a remote
> system. I was working on a local copy of our application (4D v15.4, Mac OS
> 10.11.6) to develop the viewer before moving the code into our development
> server (4D Server v15.4). I found that PROCESS 4D TAGS was not substituting
> the process variables for the tags in the template.
>
>
> I wrote a small test to see that PROCESS 4D TAGS was working as expected.
>
>
> C_TEXT($tText;$tFinal)
>
> C_TEXT(tVar)
>
> tVar:="You messed up!"
>
> $tText:="<!--#4DTEXT tVar-->"
>
> PROCESS 4D TAGS($tText;$tFinal)   -->$tFinal should now be "You messed
> up!"
>
>
> This failed in my local copy.
>
>
> I created a new fresh database and inserted this code. Works.
>
> I connected to the development server, created a new test method, inserted
> the code. Works.
>
>
> I started the local copy of our application, created a new test method,
> inserted the code. NO WORKIE.
>
> I ran the local copy through MSC and verified the structure. NO WORKIE.
>
>
> Puzzling. Any ideas or conflicts I should be looking for? Cached or corrupt
> files that should be cleared?
>
>
> If you've got a quick reply. Please cc me in your posting as I am a digest
> subscriber. Thanks.
>
>
> ----------------------------------------------------------------------------
> ------------------------
>
> Edgar Hammond                                    
> [hidden email]
>
> Quest Information Systems
>
> ----------------------------------------------------------------------------
> ------------------------
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: What would cause PROCESS 4D TAGS to "not work"

4D Tech mailing list
@Ed,

It's probably the compatibility option:
"
Use 4DVAR Comments instead of Brackets:
This option sets the notation to use when inserting 4D expressions on static pages. When the option is checked (default value), the syntax you need to use is the standard HTML notation (<!--4DVAR MAVAR-->).
"
http://doc.4d.com/4Dv15/4D/15.4/Compatibility-page.300-3285389.en.html


@Ronald the Compatibility note you mentioned is in reference to the variable defined in the calling context. see the following examples:

$tVar:="this is a local variable" // this is the calling context
vtText:="<!--4Dvar $tVar-->" // this references the local variable $tVar from the calling context
// when vtText is evaluated the local variable $tVar will be undefined because the execution context is different from the calling context

vs

tVar:="this is a process variable" // this is the calling context
$vtText:="<!--4Dvar tVar-->" // this references the process variable tVar from the calling context
// when $vtText is evaluated the process variable tVar will be defined because the execution context of PROCESS 4D TAGS is still in the same process as the calling context.


-Tim PENNER



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What would cause PROCESS 4D TAGS to "not work"

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Check you preference compatibility and make sure you have correct options checked. Also make sure method is available for 4d tags

Regards
Chuck

Sent from my iPhone

> On May 23, 2017, at 5:07 PM, Ed Hammond via 4D_Tech <[hidden email]> wrote:
>
> PROCESS 4D TAGS experts!
>
>
> I was working on an image viewer involving a local html file and using
> PROCESS 4D TAGS to substitute a URL with the source image from a remote
> system. I was working on a local copy of our application (4D v15.4, Mac OS
> 10.11.6) to develop the viewer before moving the code into our development
> server (4D Server v15.4). I found that PROCESS 4D TAGS was not substituting
> the process variables for the tags in the template.
>
>
> I wrote a small test to see that PROCESS 4D TAGS was working as expected.
>
>
> C_TEXT($tText;$tFinal)
>
> C_TEXT(tVar)
>
> tVar:="You messed up!"
>
> $tText:="<!--#4DTEXT tVar-->"
>
> PROCESS 4D TAGS($tText;$tFinal)   -->$tFinal should now be "You messed
> up!"
>
>
> This failed in my local copy.
>
>
> I created a new fresh database and inserted this code. Works.
>
> I connected to the development server, created a new test method, inserted
> the code. Works.
>
>
> I started the local copy of our application, created a new test method,
> inserted the code. NO WORKIE.
>
> I ran the local copy through MSC and verified the structure. NO WORKIE.
>
>
> Puzzling. Any ideas or conflicts I should be looking for? Cached or corrupt
> files that should be cleared?
>
>
> If you've got a quick reply. Please cc me in your posting as I am a digest
> subscriber. Thanks.
>
>
> ----------------------------------------------------------------------------
> ------------------------
>
> Edgar Hammond                                    
> [hidden email]
>
> Quest Information Systems
>
> ----------------------------------------------------------------------------
> ------------------------
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Loading...