Fork me on GitHub

xanthia_userapi_init failes for my new module!?  Bottom

  • I have a realy strange problem. I have a nice xte theme for my sajt that Ive been running for a while and it works just fine for a bunch of modules that I use. Now I wrote my own module that seems to work just fine when I run it under ExtraLite them but when I switch to my own theme it failes with the _XA_FAILEDTOINITENGINE errormessage in the theme.php!?

    // initialise the engine
    $engine = pnModAPIFunc('Xanthia','user','init');

    // check we have an engine object otherwise we can't procede
    if (!is_object($engine)) {
    echo _XA_FAILEDTOINITENGINE . $thename;
    exit;
    }

    Why does it happen when I activate my module!?

    // Samuel
  • after 6hours of debugging.. Seems like it breaks all Xanthia themes, even the default one.

    It seems like it breaks on the

    !pnModAPILoad('Xanthia', 'user')

    function in theme.php and gives an error about line 134 in theme.php wich contains

    $engine->do_themeheader($index);

    It looks like the $engine is by some strange reason not initialized correctly and does not coctain anything!? I cant realy figure out what my module could do that could actualy break this!? the module simply creates some tables of its own and dont mess with anything else.

    I use both pnHTML and pnRender in the module.. could that cause problems on Xanthia?

    / Samuel
  • Some more info... the only module that works is the

    /index.php?module=Modules&type=admin

    and even if I remove my "bad" module the theme seems to be chrashed!? What happens in the database when I activate a module!? anyone know? There must be something I do wrong that corrupts it all?
  • SOLVED: The xanthia module got "disabled" by some reason when I activated my module. So I just activaded it again and it seems to work!? This is among the wieredest things Ive ever seen!? Does anyone know why it gets disabled?
  • When you say "disabled" do you mean de-activated and removed. A couple of times recently I found Xanthia needed "upgrading" in the modules list. I still don't know why because I changed nothing except install a new module. Anyway I just ungraded and everything was OK. Strange.
  • Last time I used the PSAK, Xanthia needed "upgrading." Took me a little while to figure out that this was the problem.

This list is based on users active over the last 60 minutes.