#145 removing filters in list

15 years 4 months ago #81687 by beat
Replied by beat on topic Re:removing filters in list
I'm recognizing the bug effect...

Hope you or someone has the time in next days for a tested fix proposal, it's the right time for that ;)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 3 months ago #82814 by ndee
Replied by ndee on topic Re:removing filters in list
cmon.. i made an extensive report of my findings and the "POST method not implemented error" destroyed it!!!!!!!!


EDIT: I get always this error on pasting php code into code blocks
[code:1]Method Not Implemented

POST to /component/option,com_joomlaboard/Itemid,38/func,post/ not supported.
Apache Server at www.joomlapolis.com Port 80[/code:1]

Post edited by: ndee, at: 2008/12/19 00:06

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

15 years 3 months ago #82816 by krileon
Replied by krileon on topic Re:removing filters in list
ndee wrote:

cmon.. i made an extensive report of my findings and the "POST method not implemented error" destroyed it!!!!!!!!


Then will you please kindly retype your findings. This error occurs from time to time. Just copy your posts everytime as I do. :P


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

15 years 3 months ago #82818 by ndee
Replied by ndee on topic Re:removing filters in list
second try....
third try... making two parts...

[code:1]################# POST - after adding filter and saving list ############
filtertype 0
filterfieldlist `name`
comparison =
condition zzzzz
filter `name` ='zzzzz'
advFilterText
filterfields s(`name` ='zzzzz')


########## POST - after loading list again and removing filter and saving list#############
filtertype 0
filterfieldlist `name`
comparison >
condition
advFilterText `name` ='zzzzz'
filterfields `name` ='zzzzz'
[/code:1]

As you can see above the filterfields var is not empty as it should. Where can I find the fuction which works wrong? :) I do not understand which function updates the db entry and which does not properly empty the var...

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

15 years 3 months ago #82820 by ndee
Replied by ndee on topic Re:removing filters in list
What I understand:
In the filterfields column the filterstring/condition and the view type of the filter is stored together.
s() stands for simpleview

In the codeblock below the "s(" and ")" gets stripped. The bug effect we see is that the crippled string gets stored and then stripped again after opening the db again. So the remove function does not remove the entire string but only first 2 chars and the last one. Where should I search to get this fixed?

File: comprofiler.admin.html.php
Line: 822 - 852
CB 1.2 RC4
[code:1] $simChecked="";
$advChecked="";
$simStyle="display:none;";
$advStyle="display:none;";
$filttype=substr($row->filterfields,0,1);
$row->filterfields=substr($row->filterfields,2,-1);
if($filttype=="a"«») {
$advChecked="CHECKED";
$advStyle="display:block;";
} else {
$simChecked="checked=\"checked\"";
$simStyle="display:block;";
}
$filterlists=explode(" AND ",$row->filterfields);
$filterparts=array();
$i=0;
foreach($filterlists as $filterlist) {

$filterlistpart=array();
$filterlistpart=explode(" ",$filterlist);
$filterparts[$i]=str_replace("`","",$filterlistpart[0]);
$_CB_database->setQuery("SELECT title FROM #__comprofiler_fields WHERE name='".$filterparts[$i]."' LIMIT 1"«»);
$filtertitle=$_CB_database->loadResult();
$filterparts[$i]=$filterlist;
$filterparts[$i]=str_replace(array("'","`"«»),"",str_replace($filterparts[$i],getLangDefinition($filtertitle),$filterlist));

$i++;
}[/code:1]

Beat, I hope you can give me a hint :)


PS: METHOD NOT IMPLEMENTED error is caused by // commented php lines

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

15 years 3 months ago #82914 by beat
Replied by beat on topic Re:removing filters in list
No real idea without digging into the code. But added it to the things to check.

#145

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 2.705 seconds

Facebook Twitter LinkedIn