Forums / General / Xajax not loading

Xajax not loading

Author Message

Massimo Sanna

Wednesday 02 April 2008 9:16:00 am

Hi there,
I'm working on a website which uses xajax to manage dynamic comments. In production it works fine, but then I moved it to development and it won't load the headers.

The website was a 3.8.6, which I just upgraded to 3.9.4, but the problem remains.
I updated xajax from 1.0 to 1.1, and I copied the standard xajax.ini in /settings (the root one).

Then I have an extension called ajax_comments which is supposed to post the new comments with AJAX, and in the settings folder of this extension there's another xajax.ini.append.php which declares the functions. This is its content:

<?php /* #?ini charset="iso-8859-1"?

[ExtensionSettings]
ExtensionDirectories[]=ajax_comments
AvailableFunctions[refresh_comments]=refreshComments
AvailableFunctions[add_comment]=addComment

*/ ?>

I don't get many clues from the debug output:

Warning: eZTemplate  	Apr 02 2008 16:59:48
Operator 'xajax_javascript' is not registered

Warning: eZTemplate 	Apr 02 2008 16:59:48
Operator 'ezstr_replace' is not registered

Warning: eZTemplate 	Apr 02 2008 16:59:48
Operator 'ezstr_replace' is not registered

Warning: eZTemplate 	Apr 02 2008 16:59:48
Operator 'ezstr_replace' is not registered

Warning: eZTemplate 	Apr 02 2008 16:59:48
Operator 'ezstr_replace' is not registered

As you can see also ezstr_replace is not loading properly for some reason. The rest of extensions is working fine instead.

This is site.ini.append.php in /settings/override:

[ExtensionSettings]
ActiveExtensions[]
ActiveExtensions[]=includer
ActiveExtensions[]=ezdhtml
ActiveExtensions[]=strip_tags
ActiveExtensions[]=str_replace
ActiveExtensions[]=ajax_comments
ActiveExtensions[]=xajax
ActiveExtensions[]=simpleselection
ActiveExtensions[]=formsonfly

I don't have any clue about what to look at.... any suggestions? :(

Thanks in advance
Max

Kristof Coomans

Thursday 03 April 2008 5:15:14 am

Hi

Had private talk with Massimo and he was able to solve the problem already.

The debug output says that it was unable to find the xajax_javascript operator. Apparently one of the other extensions or settings/override/site.ini.append.php had a setting that clears the array used for template function/operator autoload paths:

[TemplateSettings]
AutoloadPathList[]

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Jorge estévez

Thursday 19 June 2008 7:58:45 am

Hi anyone
This is my problem....

I already have my site finished, but now I’m trying to plug it with xajax 1.1.
I have this PHP code (from the eZ forum):

function xxxx($object_id) {

// HTTP Response
$objResponse = new xajaxResponse();

// template init
$tpl =& templateInit();

// Add Variable to the template
$tpl->setVariable(’object_id’, $object_id);

// fetch template
$html = $tpl->fetch(
“extension/mod_myextension/design/standard/templates/foo/bar.tpl” );

$objResponse->addAssign(”mydiv”, “innerHTML”, $html);

// response
return $objResponse;
}

I need to know where to write this code, and how can I invoke this function from any of my links, given the objectID of the node which content will be shown.
Plase, any hints will be really appreciated because we are almost in deadline of our project.
thanks in advance,
Marcel

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Mickael Robin

Tuesday 25 November 2008 3:05:52 am

Another "tip" for ezxajax troobleshooting : don't forget to add the pagelayout code below in the head part of <b>every pagelayout.tpl you use</b> (ie. don't forget \design\admin\templates\pagelayout.tpl )

As explained in the doc, the code is :

{cache-block ignore_content_expiry expiry=0}
{xajax_javascript()}
{/cache-block}
<c/ode>

eZ debug

Timing: Jan 18 2025 10:20:51
Script start
Timing: Jan 18 2025 10:20:51
Module start 'content'
Timing: Jan 18 2025 10:20:52
Module end 'content'
Timing: Jan 18 2025 10:20:52
Script end

Main resources:

Total runtime0.8231 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0101 587.5859180.8516
Module start 'content' 0.01010.6506 768.4375640.9844
Module end 'content' 0.66070.1624 1,409.4219337.3906
Script end 0.8231  1,746.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00550.6628210.0003
Check MTime0.00250.3037210.0001
Mysql Total
Database connection0.00100.125110.0010
Mysqli_queries0.723987.93872010.0036
Looping result0.00210.25981990.0000
Template Total0.781695.020.3908
Template load0.00280.336920.0014
Template processing0.778994.620820.3894
Template load and register function0.00020.019810.0002
states
state_id_array0.00130.152010.0013
state_identifier_array0.00090.113720.0005
Override
Cache load0.00230.2741380.0001
Sytem overhead
Fetch class attribute can translate value0.00200.237950.0004
Fetch class attribute name0.00090.112760.0002
XML
Image XML parsing0.00360.443150.0007
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.01451.7581330.0004
String conversion0.00000.001130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0004 secs