The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Standard Filters and Client Filters Issue on Views - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Standard Filters and Client Filters Issue on Views (/showthread.php?tid=396)



Standard Filters and Client Filters Issue on Views - axel - Dec 12th, 2009

Hey!

So I previously had a form that only would let people whom had a field marked to yes to be able to be shown in a view.

And then I changed the Submission Accounts feature to use that view, and if they were not enabled, they wouldn't be able to login.

It was for a HR system, like Employee Self-Service.

I have a question. Ever sense the change in the Filters page for views, ALL my filters are gone (although they are in MySQL) however, I can't add any new ones either.

Anytime I do and click Update, it returns like there was never any filter there.
I've been swearing and examining everything for the last 5 days, but I give in. Does anyone else here know what that means? Did I not update correctly, or is anyone else having this issue?

-Axel


RE: Standard Filters and Client Filters Issue on Views - Ben - Dec 12th, 2009

Hey Axel,

Hmm... it almost sounds like maybe the DB didn't get updated.

Try this: compare your view_filters and views tables with the following (sorry for the PHP, I just copied it from the installation script). Do they look the same (i.e. have the same columns)?

Code:
$g_sql[] = "CREATE TABLE %PREFIX%view_filters (
  filter_id mediumint(8) unsigned NOT NULL auto_increment,
  view_id mediumint(8) unsigned NOT NULL,
  filter_type enum('standard', 'client_map') NOT NULL default 'standard',
  field_id mediumint(8) unsigned NOT NULL,
  operator enum('equals','not_equals','like','not_like','before','after') NOT NULL default 'equals',
  filter_values mediumtext NOT NULL,
  filter_sql mediumtext NOT NULL,
  PRIMARY KEY  (filter_id)
) TYPE=InnoDB DEFAULT CHARSET=utf8";

$g_sql[] = "CREATE TABLE %PREFIX%views (
  view_id smallint(6) NOT NULL auto_increment,
  form_id mediumint(8) unsigned NOT NULL,
  access_type enum('admin','public','private','hidden') NOT NULL default 'public',
  view_name varchar(100) NOT NULL,
  view_order smallint(6) NOT NULL default '1',
  num_submissions_per_page smallint(6) NOT NULL default '10',
  default_sort_field varchar(255) NOT NULL default 'submission_date',
  default_sort_field_order enum('asc','desc') NOT NULL default 'desc',
  may_add_submissions enum('yes','no') NOT NULL DEFAULT 'yes',
  may_edit_submissions enum('yes','no') NOT NULL default 'yes',
  may_delete_submissions enum('yes','no') NOT NULL default 'yes',
  has_client_map_filter enum('yes','no') NOT NULL default 'no',
  has_standard_filter enum('yes','no') NOT NULL default 'no',
  PRIMARY KEY  (view_id)
) TYPE=InnoDB DEFAULT CHARSET=utf8";

- Ben


RE: Standard Filters and Client Filters Issue on Views - axel - Dec 12th, 2009

Hrm.
I glanced at the SQL, and apparently it's missing that SQL lines.

Do I need to run an Update Script to correct that?

-Axel
Okay. I added the filters, and it seems to be fixed.

Thank you.
-Axel


RE: Standard Filters and Client Filters Issue on Views - Ben - Dec 13th, 2009

Huh. I wonder how that happened... I just looked over the upgrade code and those changes should have been added. Hmm! This is a bit worrying. Anyone else encountered the same problem?

I'd just add the new fields manually via phpMyAdmin or whatever database management you're using. The order of the columns isn't important, but I'd suggest adding them in the order specified in the SQL code I posted for consistency.

The only new fields are:
view_filters table:
filter_type enum('standard', 'client_map') NOT NULL default 'standard'

views table:
has_client_map_filter enum('yes','no') NOT NULL default 'no'
has_standard_filter enum('yes','no') NOT NULL default 'no'

Let me know how it goes.

If this is pretty new to you, back up the database first just in case (it never hurts and it can be a real life-saver sometimes!)

- Ben