I found the following error while testing the wiki.module (4.6.0) on Drupal 4.7.0 beta 1;

Fatal error: Call to undefined function: form_radios() in /modules/wiki/wiki.module on line 71

The related lines lines 70-72 in the module are;

function _wiki_filter_settings($format) {
  $group = form_radios(t('Support Escaped HTML'), "wiki_filter_html", variable_get("wiki_filter_html", WIKI_FILTER_HTML_DISABLE), array(WIKI_FILTER_HTML_ENABLE => t('Enable HTML'), WIKI_FILTER_HTML_DISABLE => t('Disable HTML')), t('Whether to allow |&gt;-escaped HTML.  If set to "enable", then any HTML goes on each line after the |&gt; escape marker.  If set to "disable", then any HTML tags will be shown as is, unless the HTML Filter has been separately enabled.  It is recommended that this be disabled.  Turn on the HTML Filter to support HTML, but make sure the HTML filter applies <em>after</em> the WikiText filter.'));
  $output .= form_group(t('WikiText filter'), $group);

The error occurs when selecting configure when in the Home » administer » input formats administration area.

Russ

CommentFileSizeAuthor
#4 wiki-update-47.patch6.06 KBsami_k
#1 wiki.module26.55 KBalusiani

Comments

alusiani’s picture

StatusFileSize
new26.55 KB

I have patched wiki.module to work with Drupal 4.7 beta3, this is the relevant diff -c output:

***************
*** 68,80 ****
* Settings for the WikiText filter.
*/
function _wiki_filter_settings($format) {
- $group = form_radios(t('Support Escaped HTML'), "wiki_filter_html", variable
_get("wiki_filter_html", WIKI_FILTER_HTML_DISABLE), array(WIKI_FILTER_HTML_ENABL
E => t('Enable HTML'), WIKI_FILTER_HTML_DISABLE => t('Disable HTML')), t('Whethe
r to allow |>-escaped HTML. If set to "enable", then any HTML goes on each l
ine after the |> escape marker. If set to "disable", then any HTML tags will
be shown as is, unless the HTML Filter has been separately enabled. It is reco
mmended that this be disabled. Turn on the HTML Filter to support HTML, but mak
e sure the HTML filter applies after the WikiText filter.'));
- $output .= form_group(t('WikiText filter'), $group);

! return $output;
}

-
define("WIKI_ZERO_LEVEL", 0);
define("WIKI_NESTED_LEVEL", 1);
define("WIKI_FIELD_SEPARATOR", "\263");
--- 76,98 ----
* Settings for the WikiText filter.
*/
function _wiki_filter_settings($format) {

! $the_form = array();
! $the_form['wiki_settings'] =
! array('#type' => 'fieldset',
! '#title' => t('WikiText filter'),
! '#collapsible' => TRUE,
! '#collapsed' => TRUE);
! $the_form['wiki_settings']['enable_html_${format}'] =
! array(
! '#type' => 'checkbox',
! '#title' => t('Enable HTML'),
! '#default_value' => variable_get("enable_html_${format}", 0),
! '#description' => t('Whether to allow |>-escaped HTML. If enable
d, then any HTML goes on each line after the |> escape marker. If disabled,
then any HTML tags will be shown as is, unless the HTML Filter has been separate
ly enabled. It is recommended that this be disabled. Turn on the HTML Filter t
o support HTML, but make sure the HTML filter applies after the WikiTex
t filter.'));
!
! return $the_form;
}

define("WIKI_ZERO_LEVEL", 0);
define("WIKI_NESTED_LEVEL", 1);
define("WIKI_FIELD_SEPARATOR", "\263");

I'll be glad to send my patches (I did a few other ones) to whoever would like to test them and/or to insert them into CVS.

I attach the wiki.module I am currently using.

Greetings,

Anonymous’s picture

Version: 4.6.x-1.x-dev » master

+1 to fixing this. Its to do with the new forms API in 4.7 / CVS and will bring the module up to date with CVS.

sami_k’s picture

Title: wiki.module call to undefined function error » wiki.module 4.6 to 4.7 update

Please submit a patch instead of the module so the maintainer may update the module.

sami_k’s picture

Status: Active » Needs review
StatusFileSize
new6.06 KB

patch made from the above module and cvs using unified diff. seems good to me, testing it now.

sami_k’s picture

works for me!

highermath’s picture

Version: master » 2.x-dev
Status: Needs review » Closed (won't fix)

Obsolete