Forums / Developer / [AJAX-TreeMenu] ezodcsm extension discussion

[AJAX-TreeMenu] ezodcsm extension discussion

Author Message

Paul Forsyth

Thursday 20 April 2006 3:50:22 am

The virtual_folders branch contains the improvements David wrote about on the 5th April in this thread. That branch also includes the 1.0.8 changes that are in the trunk.

The trunk contains the 1.0.8 changes.

You do need to read through this thread to see whats what :)

Paul

Marc Boon

Thursday 20 April 2006 3:58:00 am

I installed 1.0.8 from trunk, and that solves the issue of no tree in content/browse.
The changelog of 1.0.8 doesn't mention any changes though....

However, the problem that Sebastian pointed out is still present.
If I have template debug enabled in override/site.ini.append:

[TemplateSettings]
Debug=enabled

I get the error message:

[ Apr 20 2006 11:55:06 ] [127.0.0.3] No such attribute for array(7): node_id
Choose one of following: navigation_part, path, content, is_default_navigation_part, ui_context, ui_component, uri

The tree won't expand. The plus icon changes into a minus, but the expanded node only shows a few pixels of whitespace, no child nodes.

Paul Forsyth

Thursday 20 April 2006 4:14:30 am

Yip, that changelog doesnt have the additions. 1.0.8 wasnt released but it should have the additions in it i agree. I often rely on the svn log for changes:

http://pubsvn.ez.no/websvn/log.php?repname=community&path=%2Ftrunk%2Fextension%2Fezodcsm%2F&rev=0&sc=1&isdir=1

Could you try the virtual_folders branch? That may fix this. The changelog should be correct. Im hoping that if testing of this branch is successful we can release it soon.

Siniša Šehović

Thursday 20 April 2006 5:28:20 am

Hi Paul

Problem was with ShowClasses[]= !!!

Is it possible to enable all classes by default?

S.

---
If at first you don't succeed, look in the trash for the instructions.

Marc Boon

Thursday 20 April 2006 6:03:45 am

With the virtual_folders version 1.0.8 the 'Sebastian' problem disappears, but I got some new ones:

1. After I first opened a treenode, a virtual folder appeared, but I didn't want it there so I changed the sorting of the node from 'published descending' to 'name ascending'. Then I got an extemely long page load time which I interrupted after 2 minutes or so. The errorlog contained hundreds of identical messages (about 5 per second) saying: Error ocurred using URI: /deu/culture_asef/multi (which is the node I changed the sorting of.
I actually had to reboot. Apache would not even restart using the normal Apache restart control. After reboot it seemed ok. So far...

2. With debug enabled, I get the following messages:

Debug:  	Apr 20 2006 14:52:06
START URI: design:contentstructuremenu/dynamic_content_structure_menu.tpl, extension/ezodcsm/design/standard/templates/contentstructuremenu/dynamic_content_structure_menu.tpl

Warning: eZTemplate:eZURLOperator 	Apr 20 2006 14:52:06
Design element stylesheets/on_demand_content_structure_menu.css does not exist in any design

Notice: 	Apr 20 2006 14:52:06
eZTemplate: Loading template "contentstructuremenu/show_dynamic_content_structure.tpl" with resource "design"

Notice: 	Apr 20 2006 14:52:06
extension/ezodcsm/design/standard/templates/contentstructuremenu/show_dynamic_content_structure.tpl, iso-8859-1

Debug: 	Apr 20 2006 14:52:06
START URI: design:contentstructuremenu/show_dynamic_content_structure.tpl, extension/ezodcsm/design/standard/templates/contentstructuremenu/show_dynamic_content_structure.tpl

Warning: eZTemplate:def 	Apr 20 2006 14:52:06
Variable 'itemClickAction' is already defined.

Warning: eZTemplate:def 	Apr 20 2006 14:52:06
Variable 'classIconsSize' is already defined.

Warning: eZTemplate:def 	Apr 20 2006 14:52:06
Variable 'preloadClassIcons' is already defined.

Warning: eZTemplate:def 	Apr 20 2006 14:52:06
Variable 'autoopenCurrentNode' is already defined.

Warning: eZTemplate:def 	Apr 20 2006 14:52:06
Variable 'children_with_children' is already defined.

Paul Forsyth

Thursday 20 April 2006 6:40:12 am

ShowClasses[] in your ini should do the trick to show all classes.

Virtual folders only appear for published and modified sorted objects. Other sort methods will enable the standard 'show all'. This is in the doc:

http://pubsvn.ez.no/websvn/filedetails.php?repname=community&path=%2Ftrunk%2Fextension%2Fezodcsm%2Fbranches%2Fvirtual_folders%2FINSTALL&rev=0&sc=1

I tested changing the sort order and didnt experience the issue you had :(

Looking at the warnings there are only two that of issue:

Warning: eZTemplate:def         Apr 20 2006 14:52:06
Variable 'itemClickAction' is already defined.

The way the menu works is recursive so it may be an issue with eZ and template scope. I dont think its important.

Warning: eZTemplate:eZURLOperator       Apr 20 2006 14:52:06
Design element stylesheets/on_demand_content_structure_menu.css does not exist in any design

is puzzling. the css should be picked up automatiicaly by the system. are your permissions correct?

Paul

 

Marc Boon

Thursday 20 April 2006 6:49:18 am

"the css should be picked up automatiicaly by the system."

There is actually no stylesheets directory present in the ezodcsm extension. Only javascript and templates, in bothe admin and standard designs.

Paul Forsyth

Thursday 20 April 2006 6:56:04 am

Yes, you are right ;)

I missed this somehow when checking in before. Its in now. Sorry about that.

Paul

Anders Theodorsen

Friday 21 April 2006 12:35:25 pm

I tried running the version from the virtual_folders branch, but get a JavaScript error on Internet Explorer 6.0 SP2. On FireFox it runs fine.

The error message is "Object expected" on the line with this: "ezodcst_removeYearAndMonthNodesFromOpenNodesList();"

I tried removing that line from the dynamic_content_structure_menu.tpl and then the menu runs fine. I can't understand why I get that error message, any ideas?

Anders

Anders Theodorsen

Monday 24 April 2006 11:48:09 am

Nevermind that last question. I planned to do some debugging today, but now it works perfectly in both IE and FireFox... Not sure why but maybe I forgot to delete the cache files.

Marc Boon

Wednesday 03 May 2006 9:38:22 am

I just installed 3.8.0 today, and odcsm has a problem displaying the languages in the popup menu under the item 'Edit in >'. It only shows 'Another language', and fails to show the existing translations.
If I don't use the odcsm extension, all existing languages appear in this popup menu item.
Is there a ini setting that I overlooked? or is this a bug?

Paul Forsyth

Wednesday 03 May 2006 9:47:16 am

I've a feeling its more an update issue. It has to be updated for 3.8.

Paul

Marc Boon

Wednesday 03 May 2006 10:12:22 am

Update for 3.8, yes. I was under the impression that many people alreay used it with pre-releases of 3.8, but I guess this feature was not included yet.
Should there be a 3.8 branch of odcsm?

Personally, I find the virtual folders branch already a bit superfluous, since you can disable the virtual folders anyway (like I do).

I might attempt to fix this issue for 3.8, since I use the Edit item of the popup menu very often.... Don't know if any of you are planning to do this anytime soon.

Paul Forsyth

Wednesday 03 May 2006 11:03:40 am

Please feel free to add to this extension. Contact Paul to get an account:

http://pubsvn.ez.no/community-development.html

I understand your comments about the virtual folders. It certainly doesnt need to be a one-size fits all menu system. Our implementation is open for improvements and for other uses.

Another branch would be useful. We can then merge in and release a new version for 3.8.

Paul

Nicklas Lundgren

Monday 05 June 2006 5:09:42 am

Hi folks,

Im really confused regarding the performance of the ezodcsm extension on 3.8.0.
I noticed that when activating the extension, performance dropped dramatically.
A fetch of a content page in the admin interface normally takes 1-3 seconds. With this menu activated, it takes 25-40 seconds.

I enabled the debug output, and there I can see evidence of this delay - there are over 4000 SQL queries executed in every reload of the admin page!

While disabling the ezodcsm,I get my ordinary 1-3 seconds performance, and almost none of the SQL queries...

It seems like the menu in some way requires the server to go through all of the (huge...) content tree, even though the thought of the Ajax menu is NOT to do that...(right?)

Any ideas? Can I have made a misconfiguration, or is it just a plain, simple bug?

Best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Marc Boon

Monday 05 June 2006 5:35:16 am

I have been using the virtual folders branch from cvs with 3.8 for several weeks now, and it works as with 3.7, except for one major limitation, which I mentioned a few posts up: In the Edit menu, it doesn't show the available languages.
I don't actually use virtual folders, but this version seems to be more up-to-date then the other. I simply set

[AutoCluster]
Enabled=false

in contentstructuremenu.ini.append.php to disable virtual folders.

If you have problems with huge load times, you might want to check your settings, especially this one:

# If enabled (or true or 1) then 'virtual folders' such as year and months will be unfolded if the user had
# previously unfolded them
# Otherwise, month folders will only be unfolded if they contain the current node
#
# Enabling this significantly slows things down if you have more than 1 or 2 month nodes opened, so I recommend that this is disabled.
#
UnfoldOpenedVfolders=disabled

André R.

Friday 09 June 2006 6:19:36 pm

some improvments to odcontentstructuremenu.js

function newOdcsmRequest:

function newOdcsmRequest(){
    if (window.XMLHttpRequest){ //First the right way...

		return new XMLHttpRequest();

	} else if (window.ActiveXObject){ //Then the original way..

		var IE_XMLHTTP = new Array( 'MSXML2.XMLHTTP',
									'MSXML2.XMLHTTP.6.0',
									'MSXML2.XMLHTTP.5.0',
									'MSXML2.XMLHTTP.4.0',
									'MSXML2.XMLHTTP.3.0',
									'Microsoft.XMLHTTP');

		for(var i=0; i < IE_XMLHTTP.length; i++){
			try{
				return new ActiveXObject(IE_XMLHTTP[i]);
			} catch (e) {
			}
		}
    }
     return false;
}

and the last line:

odcsmRequest = newOdcsmRequest();

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Paul Forsyth

Monday 12 June 2006 3:27:40 am

Hi André,

Thanks for the cleanup :) I'll try to test in the next few days - it looks fine.

Hopefully i'll be able to work on the 3.8 stuff too.

Paul

Petr Mifek

Sunday 18 June 2006 2:46:13 pm

Please add a cze-CZ translation of the "Please wait..." message as follows:

Nahrávám...

As a temporary fix to use the "Edit in" item from the pop-up menu with multiple language sites on eZ publish 3.8.1 svn, try the following (it works for me):

1) replace ezodcsm/design/admin/javascript/popupmenu/ezpopupmenu.js with the one from the 3.8.1 eZPublish (it is in design/standard/javascript/popupmenu/ezpopupmenu.js)

2) replace ezodcsm/design/admin/templates/popup/popup_menu.tpl with the one from the 3.8.1 eZPublish (it is in design/admin/templates/popupmenu/popup_menu.tpl)

3) in ezodcsm/design/standard/templates/contentstructuremenu/show_dynamic_content_structure.tpl find "ezpopmenu_showTopLevel" (it is around line 189) and extend the ez_createAArray in this way:

ez_createAArray( new Array
( '%nodeID%', {$:thisNode.node_id}, '%objectID%', {$:thisObject.id}, '%languages%', {$:thisObject.language_js_array} ) )

Then, after clearing caches both in ezpublish and your browser, it should work.

Regards, Petr

Nathan Kelly

Monday 03 July 2006 12:26:28 am

Hi Guys,

How stable is this now?

I tried it a few months back and found that some issues were still being resolved. I'm working on a site that will have a lot of content so the AJAX menu is very appealing to avoid admin crashes due to a massive menu.

Cheers!

Pardon me while I burst into flames...