ScriptyAccordion and EE seem not to work together

Hi all

First little problem in the New Year…
I try to get ScriptyAccordion to work in a EE 1.6.8 build. The page with the effect works allright when pointing the browser directly to the php file on the server. But…
When I run the template through the EE engine, nothing happens.

A possible solution might be to hand-code everything, eventually by using another js library, but first I want to know why this does not work.

Maybe my question is beyond FW?

BTW: I do not want to reveil the location here, but I could send the adress by mail to someone who is willing to have a closer look at this… thanks! :slight_smile:


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

In the meanwhile I discovered some interesting differences between a template being processed by EE and the same template as it is on the server but now called outside EE.
I have compared the two files, and It’s only now that I see what happens.
Template as being processed by EE:

On line number 15:
html 

On line number 27-28-29
var params = ;
		if (this.next('div')) {Effect.toggle(this.next('div'),'blind',params);}else{
			if(this.up().next('div')){Effect.toggle(this.up().next('div'),'blind',params);}
		
On line number 35
	heads.invoke('setStyle',);

and in the file straight as template

On line 15:
html { height:100% }

On line 27-33:
var params = {duration:0.2};
		if (this.next('div')) {
			Effect.toggle(this.next('div'),'blind',params);
		}else{
			if(this.up().next('div')){
				Effect.toggle(this.up().next('div'),'blind',params);
			}

And on line 39:
	heads.invoke('setStyle',{cursor:'pointer'});

Conclusion: EVERYTHING that is output by Freeway between brackets {} is completely neglected by Expression Engine. Which sounds logical, because code between brackets means a tag for EE. If that tag has no meaning, it stays blank.
This is quite serious. Like the first piece of code. Which has nothing to do with Protaculous at all, but is just some basic HTML. The code

html { height:100% }

is completely stripped.

I have to think things over here. Meaning continuing using Freeway on EE generated sites.


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

Correction (sorry)
Not everything being mutilated, only some code.


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

I think you’re going to have to extract this JavaScript into an external file and call it from your template. The only other path I can see you taking is to see if there is a tag for EE which means “raw code ahead” that you can use to signal that it should leave the enclosed code alone. PHPSmarty has something for that, I wouldn’t be surprised if EE did too.

Walter


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

Hi Walter

Thanks for replying.

I tried to extract the script and call it externally, but discovered that this means also removing the ScriptyAccordion Action from that element. Otherwise the Action will insert it in the page as well. But now the paths to prototype1602packer.js and scriptaculous181packer.js are gone… I should insert that manuelly as well, but everytime I change something in the settings of the action, I must do it again for every page I want to have the accordion. I’ll loose control I’m afraid.

I looked in the EE docs, could not find any extention or plug-in that leaves code untouched.

There seems to be a preference amoung the EE folk to use JQuery. I looked here: http://jqueryui.com/demos/ and I’ll try now to insert manually one of these solutions.


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

Just remember to stay away from any of the Softpress FX Actions (and my Protaculous stuff, naturally) if you use jQuery at all on your page. The two libraries (jQuery and Prototype) cannot co-exist.

Walter


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

On 2 Jan 2010, 4:41 pm, waltd wrote:
The two libraries (jQuery and Prototype) cannot co-exist.

Walter

Yes I am aware of that, thanks. I’m in discussion with Joe Muscara just now. (off-line) It could easely be that build 1.6.8 of EE which I use parses {code} to agressively. In other words, it’s a bug. (maybe) I’ll come back with that here.

And to answer one of your suggestions, J.M discovered that everything between

{!--

and

--}

remains untouched. That’s a way to leave comments in the HTML. I used that to experiment something.
(BTW I also implemented some of the jsquery accordion scripts -manually- in a FW page. That works OK, also in EE 1.6.8)


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

OK, it’s a bug. Joe tested the file in 1.6.7 and the code escaped untouched.

Sorry about all the fuzz here on the list, but I was unaware of this.

Now let’s hope the folks at EE come out with a fix soon.


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

There are similar reports on the EE forums. I’m actually quite surprised there aren’t more reports/complaints as it can affect curly braces in code just about anywhere. It doesn’t always, but often enough.

If anyone wants more info, please ask. If you’re an EE user and encounter the error, look for the posts on the forums and participate in the discussion (I’m not sure EllisLab think they have a problem yet…).

Meanwhile, I recommend NOT updating to 1.6.8 until you know this issue is resolved.


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

They combined all my posts to one issue:


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

Problem solved from my part.
Scripty Accordion does work now in my EE build.
EE does not strip code from my templates anymore.
It has probably been a cache problem on the server?
Please read my post at the EE forum.

I have no words for this…


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