Extension talk:SpecialForm

Latest comment: 9 months ago by Pppery in topic Recover Page History

SQL Error

edit

I can't get this to run, and the error isn't a lot of help. I installed this on a 1.9.0 version MediaWiki installation running MySQL 4.0.27. When I submit the FirstForm example, I get:

Database error
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: 
(SQL query hidden)
from within function "". MySQL returned error "1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1 (localhost)".

Any idea what to check? --ScareCrow 12:46, 4 February 2007 (UTC)Reply

Hi Stéphane,

I am getting the same error that ScareCrow is getting in version 1.6.9; in addition, I get the following:

 Notice:  Undefined variable fname in ...\www\wiki\extensions\SpecialForm.php on line 130.

I also have tested this in version 1.8.3 and version 1.9.2, and the extension is not working in either of those versions; plus the Special:Version page will not display in either 1.8.3 or 1.9.2 when this extension is installed. In version 1.8.3, I get numerous notices about undefined INDEX:

In version 1.9.2, the form fields don't display; just the send button.

I would love to get this working; it's exactly what I've been looking for! I look forward to your response.

--Hoggwild5 18:39, 16 February 2007 (UTC)Reply


I'm also getting a database error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "". MySQL returned error "1146: Table 'databasename.suffix' doesn't exist (localhost)".

I attempted to create the table in my database manually, following the script's naming convention, but I was getting the error:

#1103 - Incorrect table name 'databasename.suffix'

Too bad, it looks like a potentially useful script. - Fideri

I had a similar error. You need to change this line to:

$tablesResult = $dbr->query("SHOW TABLES FROM `$database`;", $dbLink) or die(wfMsg("formquerryfailed"));
Thanks ;-)
Sbrunner 13:38, 20 March 2007 (UTC)Reply
The fix kind of works. The script now creates the database and enters that data, but I can't retrieve it in mediawiki. I get the permission error "You are not allowed to execute the action you have requested". I thought that as Sysop, I had all the rights? Anyhow, I created a new group "showform" in LocalSettings.php as follows: "$wgGroupPermissions['showform']['read'] = true;" and assigned myself the relevant user rights but I still get the same error. Am I missing something? I also tried to use the updated script by it doesn't work for me - template issues, I think. - Fideri
The right code is :
$wgGroupPermissions['showeform']['showform'] = true;
To create a new group with showform rights.
CU Stéphane 06:47, 13 May 2007 (UTC)Reply

Suggestion for documentation

edit

What's an inscription? Some explanation or definition would be helpful for those of us new to the term. I wasn't sure if this extension would be useful to me or not because I didn't know what inscription meant. Sounds like it means a sign-up form or a list of interested persons who can sign up / register themselves / add themselves to the list. TylerRick 17:59, 26 February 2007 (UTC)Reply


TylerRick, inscription (French word) means register. So you are right in your interpretation of the purpose of the script. It should allow you to collect certain information from your visitors and have it written in your database (it appears the script doesn't email you the information). You can then retrieve it for various purposes. Unfortunately, I can't get it to work. Fideri

Effectively inscription => register !
Yes it email information, You shoule add a tag
<to user="username" />
and the user should have a confirmed address in mediawiki ;-)
CU Sbrunner 13:38, 20 March 2007 (UTC)Reply

MediaWiki 1.9.2

edit

Hello,

The extension looks great. Can't make it work on 1.9.2. No link appears in toolbox -> special pages. (in French boîte à outils -> pages spéciales).

Any plan to support multi-language and French by the way?

Please, help!

--Antoine Sirianni 13:03, 1 March 2007 (UTC)Reply

Effectively there isn't special page in Special:Specialpages page.
You should create a page named Mediawiki:FirstForm then go to page Special:Form/FirstForm. Read again the install section.
CU Sbrunner 13:38, 20 March 2007 (UTC)Reply

Radio Buttons?

edit

Salut Stéphane,

D'abord, merci pour cet ajout merveilleux :) (First, thanks for the wonderful extension). I would like to use radio buttons on one of the forms I'll be using. I can't seem to figure out the syntax for it. Any ideas? Merci encore. --Nicolas 21 Avril 2007

Hello !
pour les radio boutton je suis en train de tester que cela fonctionne bien, cela devrais arriver tout soudain ;-)
CU Stéphane 13:26, 3 May 2007 (UTC)Reply

Fieldsets?

edit

Is there a way to create different fieldsets within the one form? I'm looking at using your extension to create a fairly extensive form, more than just a registration form.

Thanks/Merci

--Vavroom 00:31, 28 April 2007 (UTC)Reply

It will be added in the next version ;-)
CU Stéphane 13:47, 3 May 2007 (UTC)Reply

Data retrieval

edit

Why isn't this possible? Obviously, it is if the special page can view it so why not be able to pull in this tabular data into tables and the like? I'd rather not even deal with a MySQL table and just use wiki articles as the "tables", like how some table extensions do it. The problem I'm having is trying to get the TemplateTable table to retain the Semantic Forms links. DynamicPageList is too complicated and user-unfriendly, and I don't like all the wordy relations of Semantic MediaWiki's ask special page. :/ I just want a straightforward way to pull in table values from multiple categories/articles, configure which values go where (rows vs. columns), and allow configuration of which articles/categories are included in order to create something like this comparison table and allow this form to get all the data. Any ideas/suggestions to help me achieve this would be greatly appreciated! -Eep² 14:23, 25 July 2007 (UTC)Reply

If I understand what you say, you want to gets the data of the registers and view it on an other page ?
CU Stéphane 09:08, 16 August 2007 (UTC)Reply
Yes, but instead of using a database to store the data, how about using a wiki page? —Eep² 04:07, 17 August 2007 (UTC)Reply

Script only enters one record

edit

This is a wonderful script and exactly what I need for my current purposes - I'm working on a site to coordinate teaching at the Scottish Universities, and students need to be able to sign up for the program through a registration form.

The problem I'm having is the following: If I set $wgAutoCreateFormTable = true and the form doesn't already exist, it creates a table in the database and enters the record. Once the table contains one record already, the script produces an error, stating that the database table already exists. Turning off the variable doesn't work, as it goes through the registration, but doesn't enter the data into the database.

I've tried giving the database user full privileges on the table in question, that doesn't seem to solve anything.

Any help would be much appreciated.

Sincerely, Jan Hilmar

Edit: I have found a few sources of error in the code:

  • It appears to me (with my very rudimentary knowledge of PHP) that the statement that checks the variable $wgAutoCreateFormVariable has no else, for when the variable is set to false. Thus, if it is set to false, the Code enters absolutely nothing into the database.
  • The function mysql_table_exists isn't working. A working version can be found at http://www.phpbuilder.com/board/archive/index.php/t-10207932.html (the second example that uses three parameters).
  • There is a problem somewhere in the else clause of the if(!mysql_table_exists) statement, in that it attempts to add Fields that already exist. Completely removing the else-clause makes the code run.

Unfortunately, my knowledge of PHP is too limited to fix the code in a satisfactory manner, but I'm sure anyone with some PHP knowledge could sort out these problems?

Jan

I am having the same problem and also have limited PHP experience. A fix would be greatly appreciated. -Matt Landau

Why place XSS alert?

edit

How come did the {{XSS alert }} template falsely got in here? HTFFanBrandon04 (talk) 18:22, 25 March 2012 (UTC)Reply

It didn't get "falsely" put in there? It has been tagged by User:Bryan since 3 October 2008 for the reasons he listed in the template. Peachey88 (talk) 06:12, 26 March 2012 (UTC)Reply

Recover Page History

edit

This page was probably deleted in good faith but by mistake, since the purpose of this kind of pages is to stay online with such useful warnings:

https://www.mediawiki.org/w/index.php?title=Extension:SpecialForm&oldid=519638

It's probably better to un-delete this page, to make its old history available again to external auditors. Keeping the last revision indeed. ValerioBoz-WMCH (talk) 08:03, 26 February 2024 (UTC)Reply

No, Leaving known code with security issues publicly posted that wasn't touched and corrected in the ~4 years before deletion isn't a good idea. And if someone is really running a MediaWiki version from around 2008 and getting it externally audited, I would be slightly concerned because there would be a lot of other issues, from core MW alone.
If anyone really wants the code, any admin can get it out of the page histories and provide it. P858snake (talk) 09:30, 26 February 2024 (UTC)Reply
I agree premising that we don't usually do w:Security through obscurity in Wikimedia projects. The risk here is that people in good faith just cannot understand the situation in their legacy environment, while people in bad faith already can do anything through well-known automated attack systems. ValerioBoz-WMCH (talk) 11:52, 26 February 2024 (UTC)Reply
Randomly stumbled across this. I think P858Snake had a point when they deleted it in 2012, but 12 years later everyone who cares even one iota about updating their site has moved on and there would be no harm in undeleting since apparently someone cares. * Pppery * it has begun 05:28, 5 March 2024 (UTC)Reply
Return to "SpecialForm" page.