Support » Plugin: Custom Field Suite » [Plugin: Custom Field Suite] Javascript error creating new group

  • Resolved Covi


    Add new field button –>
    Uncaught SyntaxError: Unexpected token ; because field is empty:

    <script type="text/javascript">
    field_index = ;

    Uncaught ReferenceError: field_index is not defined -> file:line fields.js:29

    Temp fix for init errors:
    Initialize vars with defaults values or dump an error notice; eg.

    admin_head.php, line 11

    $field_count = 0;
    $options_html = array(); // For options object

    PS: I don’t have (or plugin don’t install) the table {$wpdb->prefix}cfs_fields

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author logikal16



    Delete the “cfs_version” option. The plugin will re-create the appropriate tables for you. This is likely due to manually deleting the tables after previously uninstalling CFS.

    DELETE FROM wp_options WHERE option_name = 'cfs_version' LIMIT 1;

    P.S. If this works for you, please reconsider your vote. Thanks.

    Thanks Logikal, …I’m not newbie (I know how to edit DB, etc); and I put 5 stars (because of POO) to plugin before this.

    I just think a plugin should check DB tables, directories, initialize vars… An uninstalled plugin should delete tables unused. Imagine you had 30 plugins with tables that already not in use? 30 dead tables on my DB??

    I have another example (trying to find this file…) on homepage of plugin: On thickbox, this file uses “wp-admin” directly instead admin_url('location/') (I’m not using blogurl/wp-admin/).

    Finally: I think the plugin shouldn’t assume anything. If I need delete my old db option of version, the plugin should to do this; if the plugin needs a pre-defined var, the plugin should check and setup this; …not the user.

    PS: Great work anyway; mmm… you don’t have the project on github?

    Ok, wp-admin error on admin-footer.php line 17:

    <?php bloginfo('url'); ?>/wp-admin/plugin-install.php
    <?php echo admin_url('plugin-install.php'); ?>

    <p><?php _e('See updates for', 'cfs'); ?> <a class="thickbox" href="<?php bloginfo('url'); ?>/wp-admin/plugin-install.php?tab=plugin-information&plugin=custom-field-suite&section=changelog&TB_iframe=1&width=640&height=480">v<?php echo $this->version; ?></a></p>


    <p><?php _e('See updates for', 'cfs'); ?> <a class="thickbox" href="<?php echo admin_url('plugin-install.php'); ?>?tab=plugin-information&plugin=custom-field-suite&section=changelog&TB_iframe=1&width=640&height=480">v<?php echo $this->version; ?></a></p>

    PS: I think the best option is set something like $this->admin_url to check wp version and setup admin url (WordPress Network use network_admin_url() instead).

    Plugin Author logikal16


    CFS 1.4.5 will include an uninstall hook (to clean up tables and options), as well as the other fixed you mentioned.


    Plugin Author logikal16


    CFS 1.4.5 has been released.

    Thanks! 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Custom Field Suite] Javascript error creating new group’ is closed to new replies.