Talk:Call extension

From FollowTheScore
Revision as of 16:39, 22 October 2007 by Zs6ro (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


When installing the extension the special page comes up with a new template.

What do I have to write into that template?

I don´t understand. Which special page? And please sign messages you leave here . Gero 00:00, 10 September 2007 (CEST)

What I mean is the following:

I copied the extension into the extension directory and added the include statement into the LocalSettings.php.

When done there is a new special page with the name Call. Below that page a (to me) cryptic link to a template page appears. When following that link it brings me to the dedicated template page and that is where I am lost.

Albert Cremer 10 September 2007

Oh, I see. The Call Special Page does not do anything but call another page which is given to it as an argument. So if you call it directly without an argument you will see nothing but a link to itself (which is not a real hyperlink because mediawiki suppresses self references of pages). I will add a text explaining this to the next release. It is not a defect and should not bother you. The value of the Call extension comes when you use it to invoke an arbitrary page of your wiki. You put the page name (plus its namespace) behind "Call/". And then you can add parameters (as a comma separated list).

The trick is that thus you can create wiki links to a page and pass parameters at the same time.

A link to the current page would normally look like this

This is a link to Talk:Call extension

You could make the same link with

This is a link to Special:Call/Talk:Call extension using the Call mechanism.

The only difference you will notice is that you get a special page instead of a normal page when clicking on the link. But the contents is the same.

Now we assume that our page has some code which acts upon a parameter called What. Let us assume it outputs a text line if "What" is not empty.


If we use a link to this page where we call it with a value for 'What' the page will behave differently. Try and press the following link:

This is a link to Special:Call/Talk:Call extension,What=Something Wonderful using the Call mechanism.

The whole thing is really useful to build pages which have a state concept and implement different views. See the DPL GUI for a useful application of 'Call'. 'Call' supports a design pattern which is as old as typical MainFrame Transaction Monitoring Systems like CICS are.

Thank you very much. This really helps! Albert Cremer 10 September 2007


I have installed your calendar extension. It apparently requires Call, DPL extension. These I have installed.

  • It doesn't seem ro work for me.
  • There is a blank screen but I can browse other pages on my Wiki.
  • I clicked on Call in SpecialPages and got:

"{{%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20|wikEdAutoUpdate=Fri, 28 Sep 2007 06:22:08 GMT|wikidbUserID=1}}" on a special page.

  • I read in your Wiki that if I used something like url/wiki/index.php/Special:Call/:Sandbox Hello_world, I should get the same page but it would be in a 'special' page ..
  • No matter what I do I still get the "{{%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20|wikEdAutoUpdate=Fri, 28 Sep 2007 06:22:08 GMT|wikidbUserID=1}}" line. (The "WikiEd" is a WYSWYG-text editor and the line suggest that it checked for updates - apparently does this every approximately 20 hours).
  • I disabled the WikiEd extension (removed the relevant code but i still get the same results!! (I did refresh)
  • I'm using "MediaWiki: 1.11.0"; "PHP: 5.1.2"; "MySQL: 5.0.18-Max"; "Linux SuSe 10.1" ...

Any help would be appreciated ... --Zs6ro 10:41, 28 September 2007 (CEST)

If you type an URL like
http://server/wiki/Special:Call/Hello,abc

what do you get? And do you get the same with

http://server/wiki/index.php?title=Special:Call/Hello,abc

As you see above there seems to be a problem with MW 1.11 and the Call extension ...

Gero 11:07, 28 September 2007 (CEST)


OK, thanks for the replies .. I found that when I started up my PC today (not the server), Call actually worked !!! .. That made me very happy ... I know I had done a refresh in half a dozen ways on the browser (Firefox) before, but had no luck ... Tonight I was doing some editing on my Wiki and tried Call - it didn't work - acted up like before ... Earlier it had worked! ... I killed the browser and brought it up again and Call worked !! .. I haven't been able to pinpoint the actual problem but its possible that something goes weird when i'm editing a WikiPage ?? My 'other' real problem is the Calendar - I can't get to work ... -- Zs6ro 23:36, 29 September 2007 (CEST)


I did an upgrade test with a local copy of this dpldemo website to MW 1.11 and there were no problems at all, neither with DPL nor with 'Call'. Maybe you check server caches? I think you should try to restart Apache and MySQL (although the latter will probably not be the cause ..). Gero 23:54, 29 September 2007 (CEST)

As far as I know 'calendar' does not need 'Call'. What´s your problem with 'calendar'? Have a look at the discussion page for calendar!

Gero 23:54, 29 September 2007 (CEST)


Gero,

I'll try a reboot of my server and see what happens .. i also thought it might be a browser cache thing, but doing the usual cache refresh didn't seem to make any difference .. Only when i killed the Firefox broswer and started it up again, did Call wotk fine ..

can you have a look at the Test Calendar Discussion - I have posted two posts there ... maybe you can help me with the Calendar one .. i really would like to have that up and running ..

--Zs6ro 23:59, 29 September 2007 (CEST)


Gero, I rebooted my server and now, no matter what i do, Call won't work correctly !!

All I get is "Template:F55da6d63b28c150a0297b38a67ce261" in a "Hello" Page when I use your suggested " http://server/wiki/Special:Call/Hello,abc " ...

I set "$wgShowExceptionDetails = "true";" in LocalSetting.php

And if I use Special:Call I used to get the Help screen on Call - now its the same "Template:F55da6d63b28c150a0297b38a67ce261" ... This was with the Firefox Browser ...

Using IE7 or Opera-9 I get -

Internal error
Detected bug in an extension! Hook wfCallLoadMessages failed to return a value; should return true to continue hook processing or false to abort.
Backtrace:
#0 /srv/www/htdocs/wiki/includes/MessageCache.php(683): wfRunHooks('LoadAllMessages')
#1 /srv/www/htdocs/wiki/includes/User.php(2531): MessageCache->loadAllMessages()
#2 /srv/www/htdocs/wiki/includes/Title.php(1189): User::getGroupName('user')
#3 /srv/www/htdocs/wiki/includes/Title.php(1024): Title->getUserPermissionsErrorsInternal('edit', Object(User), false)
#4 /srv/www/htdocs/wiki/includes/Title.php(996): Title->userCan('edit', false)
#5 /srv/www/htdocs/wiki/includes/Parser.php(3489): Title->quickUserCan('edit')
#6 /srv/www/htdocs/wiki/includes/Parser.php(1060): Parser->formatHeadings(, true)
#7 /srv/www/htdocs/wiki/includes/Parser.php(306): Parser->internalParse('{{null|wikEdAut...')
#8 /srv/www/htdocs/wiki/includes/OutputPage.php(474): Parser->parse('{{null|wikEdAut...', Object(Title), Object(ParserOptions), true, true, NULL)
#9 /srv/www/htdocs/wiki/extensions/Call/Call_body.php(73): OutputPage->parse('{{null|wikEdAut...')
#10 /srv/www/htdocs/wiki/includes/SpecialPage.php(459): Call->execute(':Sandbox,Hello_...')
#11 /srv/www/htdocs/wiki/includes/Wiki.php(201): SpecialPage::executePath(Object(Title))
#12 /srv/www/htdocs/wiki/includes/Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#13 /srv/www/htdocs/wiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#14 {main}

The other extensions I have installed (except for Calendar) haven't given me this much problems ... Its quite frustrating ..

Any ideas that I can try to solve this Gero ??

--Zs6ro 10:36, 30 September 2007 (CEST)


Problems with Call extension resolved

There were two problems which now have been solved.

  1. In some cases the message loading did not return true (as shown above)
  2. There were browser dependencies which lead to very strange effects (the reason being the different sequence in which the various browsers add hidden session variables to the command line parameters)

Please download release 1.4.5 and try the new version!

Gero 12:00, 30 September 2007 (CEST)


Gero, I installed 1.4.5 Call and now I get a Page coming up with -

Template:Sun

in it ... If I go to Special:Pages and click on Call, the same thing .. No matter what I do, I get the above.

I looked in " Call_body.php " and I see the help part but typing just Call doesn't show it up ??

-- Zs6ro 12:15, 30 September 2007 (CEST)

Still get Errors using CALL

Gero, even though I have "Call Ver 0.4", I still get Template errors using Firefox or IE7 ... At the moment Opera 9 seems to be working OK ...

Going to Special Pages and clicking on "Call" gives the same Template result ...

With the latest version of "Call" what was supposed to happen to 'cure' this problem ??

--Zs6ro 20:43, 21 October 2007 (CEST)

--- There is a built-in debug switch now to track such problems down. Try Special:Call/DebuG,parm=value and post your output here or give nme access to your wiki. You should see numparms=1 and {DebuG|parm=value} (with double curly braces. If not it is important to know what else you see (probably some browser variables from recent sessions). To get the help you may have to add a trailing "/" to your url (depends on browser), Special:Call/ Gero 21:43, 21 October 2007 (CEST)


OK Gero, this is what I got - In all cases I used "http://xxxxxx/wiki/index.php5/Special:Call/DebuG,parm=value" ...

0:hidetoc:0
1:style_cookie:null
2:zs6rowikidb_hamwikiToken:6623270f47de4649818426c950d3b945
3:zs6rowikidb_hamwikiUserID:1
4:wikEdFullscreen:1
5:wikidbUserID:1
6:wikidbUserName:Zs6ro
7:wikEdButtonBarControlHidden:0
8:zs6rowikidb_hamwikiUserName:Zs6ro
9:wikEdAutoUpdate:Mon, 15 Oct 2007 08:03:53 GMT
10:wikidb_session:1atcthdh6lel148gavh9il8s23
11:zs6rowikidb_hamwiki_session:6s6s2j8r98fjfgt6v11iaikul2
12:title:Special:Call/DebuG,parm=value

par=DebuG,parm=value
{{0|style_cookie=null}}
numargs=2

This was using Firefox.

--Zs6ro 07:45, 22 October 2007 (CEST)


If I use Opera 9, (which shows correctly) I get

0: :title:Special:Call/DebuG,parm=value

par=DebuG,parm=value
 {{DebuG|parm=value}}
numargs=1

--Zs6ro 07:58, 22 October 2007 (CEST)


I have restarted Firefox (not restoring like I normally do) and I still get the template error on Call .. This is the debug info:

0:wikEdButtonBarControlHidden:0
1:zs6rowikidb_hamwikiUserName:Zs6ro
2:wikEdAutoUpdate:Mon, 15 Oct 2007 08:03:53 GMT
3:zs6rowikidb_hamwikiUserID:1
4:wikEdFullscreen:1
5:wikidbUserID:1
6:wikidbUserName:Zs6ro
7:style_cookie:null
8:zs6rowikidb_hamwikiToken:6623270f47de4649818426c950d3b945
9:wikidb_session:8p7i2ma2s25mf31lhtop8al410
10:wikidbToken:f822f3ee4dfc2959414dc53866d9b115
11:title:Special:Call/DebuG,parm=value

par=DebuG,parm=value
{{0}}
numargs=1

This part puzzles me "1:zs6rowikidb_hamwikiUserName:Zs6ro" .. I still have another older Wiki running here in a "hamwiki" folder (exporting information from it to the 'new' wiki) then i'll remove it .. I renamed the "hamwiki" folder temporarily but I still get the same info ...

I await your knowledgeable answer Gero .....

--Zs6ro 08:15, 22 October 2007 (CEST)

Problems with browser variables

Currently the Call extension in line 45 filters away all browser variables which have

(UserName|UserID|_session|Token)

at the END of their name. I thought that this would be enough. But the problem is that all kinds of cookies are added to the parameter line by the browsers. The current filter matches only half of the entries in your first example:

0:hidetoc:0
1:style_cookie:null
     2:zs6rowikidb_hamwikiToken:6623270f47de4649818426c950d3b945
     3:zs6rowikidb_hamwikiUserID:1
4:wikEdFullscreen:1
     5:wikidbUserID:1
     6:wikidbUserName:Zs6ro
7:wikEdButtonBarControlHidden:0
     8:zs6rowikidb_hamwikiUserName:Zs6ro
9:wikEdAutoUpdate:Mon, 15 Oct 2007 08:03:53 GMT
    10:wikidb_session:1atcthdh6lel148gavh9il8s23
    11:zs6rowikidb_hamwiki_session:6s6s2j8r98fjfgt6v11iaikul2
12:title:Special:Call/DebuG,parm=value

You would have to extend the regexp in line 45 to match

(UserName|UserID|_session|Token|hidetoc|style_cookie|wikEd.*)

so that it reads

if (!preg_match('/(UserName|UserID|_session|Token|hidetoc|style_cookie|wikEd.*)$/',$argkey)) {

This should do for the moment. But obviously I need to look for a more general solution.

Could you please post here the output you get when you type directly into the browser:

  yourwiki/index.php?title=Special:Call/DebuG,a=b&c=d

or

  yourwiki/Special:Call/DebuG,a=b&c=d

(It should be the same in both cases). I am interested in the sequence of the output, especially where "c:d" will appear. Doing this here in this wiki will give [1].

Gero 08:35, 22 October 2007 (CEST)

Before changing line 45 the output using "index.php?title=Special:Call/DebuG,a=b&c=d"

0:title:Special:Call/DebuG,a=b
1:c:d
2:wikEdButtonBarControlHidden:0
3:zs6rowikidb_hamwikiUserName:Zs6ro
4:wikEdAutoUpdate:Mon, 15 Oct 2007 08:03:53 GMT
5:zs6rowikidb_hamwikiUserID:1
6:wikEdFullscreen:1
7:wikidbUserID:1
8:wikidbUserName:Zs6ro
9:style_cookie:null
10:zs6rowikidb_hamwikiToken:6623270f47de4649818426c950d3b945
11:wikidb_session:8p7i2ma2s25mf31lhtop8al410
12:wikidbToken:f822f3ee4dfc2959414dc53866d9b115
13:zs6rowikidb_hamwiki_session:hp420h33te8faetrr1v5rdri84

par=DebuG,a=b
{{DebuG|a=b|c=d|wikEdButtonBarControlHidden=0}}
numargs=3

and with line 45 modified

0:title:Special:Call/DebuG,a=b
1:c:d
2:wikEdButtonBarControlHidden:0
3:zs6rowikidb_hamwikiUserName:Zs6ro
4:wikEdAutoUpdate:Mon, 15 Oct 2007 08:03:53 GMT
5:zs6rowikidb_hamwikiUserID:1
6:wikEdFullscreen:1
7:wikidbUserID:1
8:wikidbUserName:Zs6ro
9:style_cookie:null
10:zs6rowikidb_hamwikiToken:6623270f47de4649818426c950d3b945
11:wikidb_session:8p7i2ma2s25mf31lhtop8al410
12:wikidbToken:f822f3ee4dfc2959414dc53866d9b115
13:zs6rowikidb_hamwiki_session:hp420h33te8faetrr1v5rdri84

par=DebuG,a=b
{{DebuG|a=b|c=d}}
numargs=2

The 'hamwiki' is odd and the "WikEd" is not installed on this Wiki and its stopped on the 'old' Wiki ...

If I use ".../wiki/Special:Call/DebuG,a=b&c=d" I get Error 404 !!

--Zs6ro 11:41, 22 October 2007 (CEST)


This looks good. Please use version 1.5.0 of DPL now (only Call_body.php changed)! I tried to improve the algorithm a little. If you do not make any change to the new version you may get your template called with some additional variables coming from browser cookies but that should do no harm, similarly as in your first example.

I suspect that the new version will work will all browsers in all constellations (although DebuG may sometimes show that additional variables are being passed). Can you please confirm this is true?

You get the 404 because you have no apache URL rewriting rule installed. That is a convenience feature only, so don´t mind.

Gero 15:10, 22 October 2007 (CEST)

I installed Call ver 0.5 and immediately it worked correctly .. I hadn't restarted the PC or browser ... Even clicking on "Call" in Special Pages brings up the Call Help text ... I'll keep an eye on it and see if it behaves itself ...

Here is the debug info using ".../wiki/Special:Call/DebuG,a=b&c=d" ..

0:title:Special:Call/DebuG,a=b
1:c:d
2:wikEdButtonBarControlHidden:0
3:zs6rowikidb_hamwikiUserName:Zs6ro
4:wikEdAutoUpdate:Mon, 15 Oct 2007 08:03:53 GMT
5:zs6rowikidb_hamwikiUserID:1
6:wikEdFullscreen:1
7:wikidbUserID:1
8:wikidbUserName:Zs6ro
9:style_cookie:null
10:zs6rowikidb_hamwikiToken:6623270f47de4649818426c950d3b945
11:wikidb_session:8p7i2ma2s25mf31lhtop8al410
12:wikidbToken:f822f3ee4dfc2959414dc53866d9b115
13:zs6rowikidb_hamwiki_session:hp420h33te8faetrr1v5rdri84

par=DebuG,a=b
argTitle=0
argCount=2
{{DebuG|a=b|c=d|wikEdButtonBarControlHidden=0}}

Thanks for 'fixing' it Gero ...............

--Zs6ro 16:39, 22 October 2007 (CEST)