Widget not added


I still have a problem with my widgets. I can move them, i can delete them, but i can't add none of them. I was testing it with firebug, it seems like there is a problem with page owner guid. I know also where excatly is the bug, but i don't know how to use it.. in /js/lib/ui.widgets.js:

elgg.action('widgets/add', {

data: {

handler: type,

owner_guid: elgg.get_page_owner_guid(),

context: $("input[name='widget_context']").val(),

default_widgets: $("input[name='default_widgets']").val() || 0


success: function(json) {


// in this place firebug says:


  1. Uncaught TypeError: Cannot read property 'output' of null
  2. elgg.action.successelgg.1333805348.js:2068
  3. f.extend._Deferred.e.resolveWithjquery-1.6.4.min.js:2
  4. f.support.ajax.f.ajaxTransport.send.d "





I need some tip, this problem is nightmare... Thanks a lot!

  • Hello, I have the same problem, any ideas?

  • Just've added:

    if ((documentFragment !== null) && documentFragment.hasOwnProperty('output')) {

        alert(typeof documentFragment);


    into this code and it returns:

    Uncaught ReferenceError: documentFragment is not defined

    Something is wrong with the object? Or it is technically jquery problem?


  • There is no programmer who can help?

  • what de heck is " documentFragment " dat's not defined ? I not see not defined either ;-) and posting little snips of code from here/there does not give whole picture ;(


  • Problem adding widgets? Did you edit any core files or are you using any third party plugin?

    Rodolfo Hernandez
    Arvixe/Elgg Community Liaison

  • @DhrupDeScoop: I've already deleted that part, because i found that code somewhere in the net, I've been trying everything, you know. I can't add here the whole code, because it makes no sense, the bug is here. It can be something with php file add, it seems like widget is not created, the object is empty. But i haven't changed there anything!

    @rjcalifornia: I dno not really remember, but if so, it was very little changes, but it doesn't matter - i have the same files, the same site on the otehr server and there it works perfectly. I've been checking every plugin, turning it off and on.Maybe it is something with server?

  • Widgets 'ADD" is driven by jQuery - so when click on widget to 'add' -- the jQuery JS shud trigger to do on-screen 'add' & shuffle-shuffle and 'added' to the active widgets in the main widgets area below the widgets list. If this not works - issue should be with the jQuery/JS for the 'Add'

  • Not really, i've just found out that it must be the problem with some rewrite rules in .htaccess. I've had repaired other problem with my server (my css formating was missing on the new server, so i changed cache rewrite rule: "RewriteRule cache\/(.*)$ engine/handlers/cache_handler.php?request=$1&%{QUERY_STRING} [R]") and now, when i'm trying to add widget it shows me a message:

    "Form is missing __token or __ts fields";

    need to find out how to give ts and action token to that action or  find out what is wrong with my rewrite rule:    

    RewriteRule ^action\/([A-Za-z0-9\_\-\/]+)$ engine/handlers/action_handler.php?action=$1&%{QUERY_STRING} [R]


    If someone would help me, i would really appreciate it!