creating a cookie using EE and Freeway

I couldn’t find any reference to this script on your home page, but on
one of your watch detail pages, you have a JavaScript error:

ReferenceError: Can’t find variable: swfobject

Which might be throwing things off.

Also, it is very important when debugging cookies to delete all
cookies from your domain before you visit the page for a test. You may
have both cookies in your cookie jar (no kidding – that’s what it’s
called) and you have to get rid of them before you can accurately test
anything.

Try this. First, go to a neutral page, like Google or Apple.

From the main menu > Safari: Preferences: Security, then click the
(Show Cookies) button.

Type a fragment of your domain name in the search bar, then select and
remove all cookies with your name on them.

For extra good measure, quit the browser and restart it. (Not
explicitly needed, but when debugging, it is critical to have a known
good state to start from.)

Walter

On Oct 23, 2010, at 9:52 AM, ummedia wrote:

No difference Walter. I tried with the dot and without, still doesnt
recognize

http://digitalwatchlibrary.com

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Still nothing Walter. I removed the swf script and followed your instructions twice, one with the dot in the .js and one without. Anything else I can try?

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This is my setting script just to make sure.

<script type="text/javascript">
    document.observe('dom:loaded',function(){
        var this_page = {exp:weblog:entries status="open|libraryonly|collection"}{entry_id}{/exp:weblog:entries};
        var arr = (Cookie.get('myHistory')) ?
            Cookie.get('myHistory').split('|') : [];
        arr.push(this_page);
        Cookie.set('myHistory',arr.join('|'),null, 'domain=.digitalwatchlibrary.com;path=/');
 });
    </script>

dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s what I see in my cookie when I visit one of the pages:

“exp_last_activity=1287863991; exp_last_visit=1287419784; exp_tracker=a
%3A4%3A%7Bi%3A0%3Bs%3A31%3A%22%2FDWL%2F1work%2Fomega_montreal_1611%2F
%22%3Bi%3A1%3Bs%3A5%3A%22index%22%3Bi%3A2%3Bs%3A23%3A%22%2FDWL%2F1work
%2Fcasio_aw-60%2F%22%3Bi%3A3%3Bs%3A5%3A%22index%22%3B%7D;
exp_last_activity=1287271696; exp_last_visit=1267657063;
myHistory=1441|1468”

There appear to be a lot of other cookie-related things going on in
that page, with the only part I recognize from the code we’re working
on together as the very last element of the cookie (myHistory).

I’m not sure if all of the cookie parts have to set the same domain,
or not.

Your exp_ code appears to be setting cookies for all
of .digitalwatchlibrary and digitalwatchlibrary and
www.digitalwatchlibrary. Maybe the way around this is to do the same.

<script type="text/javascript">
    document.observe('dom:loaded',function(){
        var this_page = {exp:weblog:entries status="open|libraryonly| 
collection"}{entry_id}{/exp:weblog:entries};
        var arr = (Cookie.get('myHistory')) ?
            Cookie.get('myHistory').split('|') : [];
        arr.push(this_page);
        Cookie.set('myHistory',arr.join('|'),null,  
'domain=.digitalwatchlibrary.com;path=/');
        Cookie.set('myHistory',arr.join('|'),null, 'domain=www.digitalwatchlibrary.com 
;path=/');
});
    </script>

This strikes me as silly and redundant, but hey, give it a try and see
what happens.

Walter

On Oct 23, 2010, at 9:52 AM, ummedia wrote:

No difference Walter. I tried with the dot and without, still doesnt
recognize

http://digitalwatchlibrary.com

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thats stopped it working completely Walter, was it OK to just copy and paste from here?

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter
removed all the spaces that shouldnt be there and its working as it was. Its still not recognizing .digitalwatch though.

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Nothing wrong with your paste, but just roll back to the dot version.
I don’t have any further ideas here.

Walter

On Oct 23, 2010, at 1:26 PM, ummedia wrote:

Thats stopped it working completely Walter, was it OK to just copy
and paste from here?

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for trying anyway Walter, I did notice that whatever we did it never came up .digitalwatchlibrary.com in my host. Could that be to do with the .js file?

anyway again thank you for your precious time Walter.

Enjoy the rest of your weekend

kind regards

Adam


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options