Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] ModalPicker filter string issue

[FIXED] ModalPicker filter string issue 18 Mar 2019 10:59 #15685

  • Nicolas
  • Nicolas's Avatar
  • Offline
  • Premium Member
  • Posts: 83
  • Thank you received: 12
  • Karma: 6
hello the cooks
I have a problem with my list of articles.
When the page appears, I have no default elements in the grid on the frontend.
I need to change one of the filters or limit for the items appear.

When I delete the filters in the model, everything works fine, but I would like that by default everything is displayed and that the user can filter.

everything is fine on the backend
Does anyone know this problem?

thank you in advance
Nicolas
Last Edit: 18 Mar 2019 23:34 by Nicolas.
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 19 Mar 2019 00:04 #15686

  • Nicolas
  • Nicolas's Avatar
  • Offline
  • Premium Member
  • Posts: 83
  • Thank you received: 12
  • Karma: 6
ok everyone
I found the problem. When I create a menu link to my item list page, joomla does not automatically create the link like this:

index.php? option = com_maintenance & view = tickets & filter_created_by = - Select Name - & filter_lieu = - Select Name - & filter_type = - Select Name - & filter_statut = - Select Name - & filter_priority = - Select Name -

I changed it manually in my database, but is this normal?
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 20 Mar 2019 21:33 #15687

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I never saw that one.

Really strange.
Its an issue with your filters.
Are your filters linked to FK or to a string (should not be possible, just asking)
Coding is now a piece of cake
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 22 Mar 2019 04:51 #15688

  • Nicolas
  • Nicolas's Avatar
  • Offline
  • Premium Member
  • Posts: 83
  • Thank you received: 12
  • Karma: 6
hello admin
I think the problem comes from the items list "default.xml" file.
The options of creating the link menu are generated by this file. I have something like this:
<?xml version="1.0" encoding="utf-8"?>

<metadata>
	<layout title="MAINTENANCE_LAYOUT_TICKETS">
	<message>
		<![CDATA[MAINTENANCE_LAYOUT_SHOW_TICKETS_LAYOUT]]>
	</message></layout>

	<fields name="request">

		<fieldset name="request" addfieldpath="/administrator/components/com_maintenance/models/fields">

			<field name="filter_created_by"
					label="MAINTENANCE_JSEARCH_FILTER_CREE_PAR"
					required="false"
					default=""
					description="MAINTENANCE_JSEARCH_SELECT_USER"
					nullLabel="MAINTENANCE_JSEARCH_SELECT_NAME"
					type="modalpicker"
					model="thirdusers"
					labelKey="name"/>

			<field name="filter_creation_date_from"
					label="MAINTENANCE_JSEARCH_FILTER_CREE_LE_FROM"
					required="false"
					default=""
					description="MAINTENANCE_JSEARCH_SELECT_CREE_LE_FROM"
					nullLabel="MAINTENANCE_JSEARCH_SELECT_CREE_LE"
					format="d.m.Y H:i"
					type="ckcalendar"/>

			<field name="filter_creation_date_to"
					label="MAINTENANCE_JSEARCH_FILTER_CREE_LE_TO"
					required="false"
					default=""
					description="MAINTENANCE_JSEARCH_SELECT_CREE_LE_TO"
					nullLabel="MAINTENANCE_JSEARCH_SELECT_CREE_LE"
					format="d.m.Y H:i"
					type="ckcalendar"/>

			<field name="filter_lieu"
					label="MAINTENANCE_JSEARCH_FILTER_LIEU"
					required="false"
					default=""
					description="MAINTENANCE_JSEARCH_SELECT_LIEU"
					nullLabel="MAINTENANCE_JSEARCH_SELECT_NOM"
					type="modalpicker"
					model="lieux"
					labelKey="nom"/>

and the genrated link is :
index.php? option = com_maintenance & view = tickets & filter_created_by = - Select Name - & filter_lieu = - Select Name - & filter_type = - Select Name - & filter_statut = - Select Name - & filter_priority = - Select Name -

The problem is that when you do not enter any option on the menu link, joomla take by defaults the "nullllabel" of the modalpicker.

i tried without "nulllabel" and that work better

Nicolas
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 30 Mar 2019 22:12 #15690

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
Hmm, I have the same problem!
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 31 Mar 2019 07:07 #15691

  • Nicolas
  • Nicolas's Avatar
  • Offline
  • Premium Member
  • Posts: 83
  • Thank you received: 12
  • Karma: 6
Hey Romkabouter
I have not yet solved the problem. for now, I have a problem of combobox and ajax ... but in first time you can removing the nullLabel from the link filters in the default xml of your list.
Second solution, recreate the link directly in the DB by removing the filters.
Third possibility, change the modal picker into combobox (combo don't keep the null label).

these are temporary solutions
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 31 Mar 2019 07:29 #15692

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
You could also use URL als menu item type en insert
index.php? option = com_maintenance & view = tickets as url :)

Works fine, but you will loose language assocations

I do not know when the problem occured first, I have never had this problem. Possibly a new issue in one of the latest builds.
Last Edit: 31 Mar 2019 07:32 by Romkabouter.
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 01 Apr 2019 10:17 #15693

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I found, currently fixing it.

The problems comes from a hidden input storing the current value of the filter.
To understerstand the problem (for your curiosity)
Explore the DOM HTML tree (after page loading), find the hidden input and set it to type="text"
So you can see this hidden input is populated with string instead of number (FK)
Result : At first creation, the menu item is working fine. But if you edit and save, the mess happens.

Fix coming
Coding is now a piece of cake
The administrator has disabled public write access.

[FIXED] ModalPicker filter string issue 01 Apr 2019 10:42 #15694

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Fixed

The file to upgrade :
ADMIN /models/fields/modalpicker.php
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: Nicolas
Time to create page: 0.201 seconds

Get Started