This project is read-only.

2.0.66 serviceurl

Developer
Mar 9, 2011 at 3:04 PM

Hi Anton,

I just installed latest version (wow, great news once again!), and have an issue with the new version of serviceurl() function.

In order to let some of the xsltdb modules on my site (some xslider) back working properly, I had to comment out the use of "config" parameter, since I reuse some configurations across different pages and modules.

Let me comment, so that you can tell if something is wrong:

  • on my site I often reuse configurations, that is I save an xsltdb and assign it a configuration name (e.g. "XSLider 01.00.03"), then
  • I can add new xsltdb module instances, and apply the wanted configuration just by choosing "load existing configuration";
  • once loaded configuration, I have a new module with same config, but with its own module settings.

What I feel, pls correct if I'm wrong, is that with that new configid param added to serviceurls I am no more able to serve point 3 (one configuration reused on different module instances, each with its own module settings - this allows great flexibility AND configuration reuse).

I could temporarily solve commenting out the parameter, but would like to find a correct solution. Maybe a serviceurl() method that optionally allows me to get the serviceurl without configid?

Coordinator
Mar 10, 2011 at 4:52 AM
Edited Mar 10, 2011 at 6:06 AM

Hi, Alberto!

I think there is some additional option that leads to your problem.

I created the following configuration and it works fine in your scenario

 

Direct: {{mdo:get-module-setting('test')}}<br/>
Service: <span id="t-{mdo:dnn('M.ModuleID')}"/><br/>

<script type="text/javascript">
  $("#t-{{mdo:dnn('M.ModuleID')}}").load({j{mdo:service-url('test')}});
</script>

<mdo:setup>
  <setting name="test" type="text">
    <caption>Test Setting</caption>
  </setting>
</mdo:setup>

<mdo:service name="test" type="text/html">
  {{mdo:get-module-setting('test')}}
</mdo:service>

 

Can you change this configuration to show me what the problem exactly in?

Developer
Mar 10, 2011 at 11:41 AM
Edited Mar 10, 2011 at 11:43 AM

Anton,

I still have to investigate this, I probably have something wrong in XSLider (also mixing different versions on my site). At first sight I thought the problem is not with the xslt, yet with configuration reuse.

I mean, if you:

  • save this xsl as a configuration, giving it a name (e.g. MyConfig 1)
  • configure the first module 
  • add a new module instance loading the same configuration (load existing configuration)
  • configure the second module with custom setting
  • mdo:services from the two modules do return different data?

More: maybe my problem is about how I reuse mdo:services (for example second module calling mdo:service of first module, to get data from it instead of its own).

Will do a test asap and let you know, thank you.

al.

Coordinator
Mar 10, 2011 at 2:19 PM

Yes, if I perform your steps with config above it will show different values.

Developer
Mar 24, 2011 at 2:05 AM

Anton,

I finally found the time to check: my fault, the problem came from a call to mdo:dnn('M.ModuleID') within an mdo:service. Which does work, but I was not seeing a logical error when reusing configurations and also content.

Briefly, I have some slides shared between some xslider module instances, and loaded by a calling module with calls to mdo:services from another module (url manually copied and set in module configuration; modules share the same configurationid): in those cases I just have to identify moduleid, in my mdo:services being called, as mdo:request('mod') to acquire the wanted module context,  instead of dnn('m.moduleid') which gives the calling module context.

I'm probably the only one doing such a mess of modules, configurations and mdo:services, forget this ;)