Skip Navigation

[Resolved] waqas please a follow up

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 40 replies, has 2 voices.

Last updated by martinP-13 4 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1474167

https://toolset.com/forums/topic/split-how-to-assign-a-specific-handler-to-a-dog-for-each-event/

this old ticket , i have finally got around to doing this , how ever everything works , but when on event page here
hidden link , i can now see the Dog Handler for the Event
like shown in original ticket , how ever when i select the handler nothing is saved and therefore not displayed on website.also the handler isnt save if i create anew dog here.

this part here
Important note: Please make sure that the "Dog Handler for the Event" matches the title of this new field and the "handler" matches the slug of the "Handlers" post type when i try set the slug of the new field to magch handler ie "handler"
like the skug for my post type handler it wont allow the same slug. what am i doig wrong?

thanks waqar

#1475007

Hi Martin,

Thank you for contacting us and I'd be happy to assist.

I was able to reproduce this issue on my test website too. The options are correctly saved through the dynamic select field when a new or existing post is joined in a relationship, however, the selected value is not shown in the relationship section's column.

To confirm this, I joined the dog post "hpr test" with the event post "MUNCASTER GUNDOG CLUB" from the edit screen that you shared and for the handler field selected "Lee Marson".

Now, although that handler is not showing as saved/selected on the post edit screen of these dog or event posts ( screenshot: hidden link ) if you'll go to the edit screen of this connection's intermediary post "Events Dogs: 13857 - 20029" ( hidden link ), you'll see that the handler's ID is properly saved in that custom field ( screenshot: hidden link ).

Thank you for bringing this forward and I've passed on these findings to the concerned team for further review. I'll keep you updated on the progress through this ticket.

Meanwhile, you can continue using this field and the only downside would be that it will not show selected value in the relationship management section on the parent and child post edit screens.

You'll still be able to show the selected handler on the front-end.

Please refer to the content of the view "View to show all dogs related to an event"
Back-end screenshot: hidden link

Front-end screenshot: hidden link
( page: hidden link )

regards,
Waqar

#1475627
waaqar 2.png

thank you waqar , i forgot to set the view..... that didnt help a lot either .

can i ask , when i click for instance Dog Handler for the Event field and it populates a list , when i finaly start adding data i may have over a thousand handlers , thats a lot of scrolling and finding , whilst i appreciate that just showing handlers for that dog is a complexity outside of your support , is it possible to be able to start typing the name to find the handler , like the screen shot shows nothing fancy required.....
thanks as always

#1475885

waqar i think im in a bit of a pickle here , i think i have got lost ..... ill try explain , this is not strictly relevant to this exact topic .... but essential to how my whole system works and if in fact most of my work so far is WRONG,
i find my self with lots of work refilling the same info on lots of post types , i have hundreds of views etc etc it has become that outrageous i dont even know how to get all the info submitted let alone

so my top level would be "events" , an event has a club ,location (club and location are set by event calendar) stake (category) ,judges and places.

a judge can judge a dog 1 week and then can handle ,breed or own a dog 2 days later. basically a judge can also be a competitor..... even on the same event a breeder could be the judge.

a judge can have a kennel affix, a panel status of a,b or np . and a number , not all judges have all of these.

next within the events are places , places have , a dog ,dog breed sex and date of birth. owner ,Handler ,Breeder: sire and a Dam.

for the above i have relationships for all sorts (24) of post types.
i have 102 views...........( :0( )

this seems WELL excesive......

i am linking handlers to jusges then hiing the handler so it shows the judges name then rthe same for owners etc etc ....

my thinking is to export all this so i have it so should i need to i have a backup delete EVREYTHING update the plugin ( i dont as im scared ill break stuff) and start afresh. from the way handlers has beeen achieve using the function im thinking my whole bloated system can be HEAVILY stream lined as follows:

events would have a place custom field type

then i would have PEOPLE , with custom fields kennel affix (note 1) , a panel status , a number , phone number , email and website

then i would have dog S WITH custom fields ,dog breed ,sex ,date of birth ,owner ,Handler ,Breeder (the previous 3 would select a PERSON from within PEOPLE) a sire , a Dam and a kennel affix (note 1).

note 1 where would i have this kennel affix so it could be shown in front of a dogs post title and also next to a persons name.

im really sorry for the long post but as is i dont think its viable to continue 1 event would take me 3 hours......

what are your thoughts waqar?

#1476889

Hi Martin,

I can understand your concerns.

Looking at the current views and post-relationships that exist on the website, it makes sense to re-think the structure, to make things more streamlined and less repetitive. This way they'll be more efficient to manage and maintain in the long run.

I'll be reviewing the specifications that you've shared and will be able to suggest the best way forward, by Monday.

Note: At this stage, it is very important that we've clearly discussed all the involved data elements and fields with their expected usage so that we don't have to re-structure the project again. Feel free to add on any missing details, over the weekend.

regards,
Waqar

#1476901

thanks waqar , i will add every last bit of info i can later today , im glad i thought correctly.

#1477609

i have wrote a word document how can i upload it?

this is it basically , as best i can explain it.

Post types
:people ,custom fields for people will be:

Events .
Every event has :
Stake : which is basically a category , when clicked does this
Judges : will need a people post type it will need a person < ---- > event many to many relationship . This will be a view to show a person related to an event the view will have a h1 title of JUDGES .this will just be a heading, a judge will be a person , it will show a persons custom fields if it has them. on event page in wp-admin I can choose a person to go into this view like here, under judges ,
Custom fields needed for this view are , panel (choose A,B or NP) , a number (typed in) , KC Affix.(text line,this needs to be clickable so it will goto a kc affix page that’s shows all dogs with the kc affix related to an evet).

Places : ie 1st 2nd 3rd etc
This will be a separate view it will need a event < ----- >dog relationship ,Each event will have the following selectable custom fields like here (select -7e0….)
Each place will show : dogs title (cutom field) like here , kc affix (this will be the same custom field used on people) followed by the dog.(title of the post type).breed , sex and d.o.b (dog custom fields like here ).
Each place will also show breeder,handler,owner (all 3 will be people selected from the events page the view will have labels breeder,handler,owner )
The dogs sire and dam (custom fields of dogs) the sire and dam will also show custom field of dogs title (cutom field) like here , kc affix (this will be the same custom field used on people) followed by the dog.(title of the post type).breed , sex and d.o.b (dog custom fields like here )

…………………………………………………………………………………………………………………………………………………………..

All of the above will cover all info I need across the site, I will have to nest views etc… ?

If I go on a page of a person how can I show results of a person where they where a handler,
How can show just results for if they judged an event same with owner breeder??????????

Do I have a post type of PEOPLE with custom post fields of judge breeder owner handler , can I create these from an event page?

.

#1479989

i think explains better waqar

I really want to be able to complete a dogs info in wp admin and complete the events info on wp admin , no more pages needed to get info into website….

Events : this shows a single event like this
Clubs :this shows all events related to that club like this
Location: this shows all events related to that location like this

People: (currently judge) this shows persons details is current format is JUDGE but will work as described below (a loose example here )
Dog: this will show dogs info then it will show events linked to that dog and also any dogs it is the sire or dam of like this
Sire: works like a dog post ?? unsure what to do does this need to be a post type or can it use dog (see below)
Dam: works like a sire post ?? unsure what to do does this need to be a post type or can it use dog (see below)
Kc affix: UNSURE…… SEE VIEWS BELOW

Dog page (post type)
Made up of [dogs awards],[kc affix] [dogs post title] ,[FTCH]MALLOWDALE][ZAPPER] FTCH MALLOWDALE ZAPPER

Custom fields needed.
[DOGS AWARDS]= check box select FTW,FTCH,FTAW,OFTAW,OFTW,CHAMPIONSHIP WINNER just display (not clickable )
[KC AFFIX] = ] not sure on this one , a person has an affix ,if a person breeds a dog the dog has that affix

[dogs post tiltle] = post type title (link , but not a link on its own post type)

These will sit under the actual dog these 4 are display only and not clickable
[breed]= select = cocker spaniel,springer spaniel ,clumber spaniel
[Sex]=select= dog,bitch
[date of birth]= date picker
[dog image] = image = only shown on actual dogs post

Sire label
Dam label
These wont be custom fields not sure if I can have a relationship of dog , < - - - --> dog…….. MAYBE TAXOMOY?
[SIRE] = here I will create a new dog or select an existing dog that will use all the same as this dog post type(when clicked will open a page or post showing all dogs and there events linked to the sire (dog)
[Dam] same as sire settings
When clicked it will take you to that dog pages and display all results related to that dog

We will then have labels for :Handler , : owner :
Will theses be custom fields of person? Or on the dog? Each will be many to many and the same dog can have a different owner and handler from from event to event. These wil be selected from the event page. In the dog section

Custom field for dog …… this will selected from the dog page
Breeder , a dog can have 1,2,4,3 have breeders , a breeder can be linked to many dogs , but a dog will always have the same breeders. this will display the person there kc affix and judge custom post typyes
then show results etc of the dog.
like here

person(currently JUDGE)
person title (post title)
custom fields needed
[judge panel ] select A , B ,NP

[Kennel Club Affix] not sure on this one , a person has an affix ,if a person breeds a dog the dog has that afix

[Phone] a persons phone number
[Email] a persons email address
Website: a persons website address

We then want to show all events and the results related to this person as follows

View THE PERSONS Results As A Judge.
View Trial Results Of Dogs THE PERSONS Bred.
View Trial Results Of THE PERSONS Handled.
View Trial Results Of Dogs Owned By THE PERSONS
View Trial Results Of Dogs With THE PERSONS Affix's.

…………………………………………………………………………………………………………………

EVENTS

Places : ie 1st 2nd 3rd etc

Each event will have the following selectable custom fields like here (select -7e0….) for a dog at each event
A place also needs the following numbers attached to it
1st – 5
1st and guns choice - 5
2nd – 3
2nd and guns choice - 3
3rd -2
3rd and guns choice -2
4th – 1
4th and guns choice -1
These will be displayed after the place

#1482237

Hi Martin,

Thank you for sharing these details.

I'll be reviewing these requirements and will perform some tests on my website, to suggest the best way forward for the structure.

Sorry, this is taking a little longer than expected earlier, but I just want to be sure that we adopt the most efficient approach this time.

I'll share my detailed recommendations, once this review and the testing completes.

Thank you for your patience.

regards,
Waqar

#1482571

ok thank you , hopefully be soon so i can get this finalised once and for all , thank you waqar

#1484553

any updates waqar ? is it even possible? thanks

#1486707

Hi Martin,

Please accept my sincere apologies for the delay.

We've been having a slightly busier than usual queue at the forum and I couldn't allocate the time I wanted to for this testing.

I just wanted to let you know that I'm working on this now and I'll have an update to share with you, in the next few hours.

regards,
Waqar

#1487297

Hi Martin,

Thank you for waiting.

After reviewing your requirements and some testing, this is the structure that I'll recommend:

A). Custom Post Types:

1. Events ( I understand this will be controlled by the events plugin )

2. Persons:
In order to be used in any role ("judge", "owner", "handler", "breeder" etc), a person will need to be available as a post in this post type.

The fixed custom fields data like contact information, kennel affix etc, which won't be changing with events will be saved with this post type.

3. Dogs:
Each dog's fixed custom fields data like age, sex, sire, dam, etc, which won't be changing with events will be saved with this post type.

Note: You don't need separate post types for saving sire and dam of a dog. You can create a select type custom field in this post type for sire and dam and populate the options, dynamically from the same dog posts, using the "wpt_field_options" filter.
( ref: https://toolset.com/documentation/programmer-reference/types-api-filters/#wpt_field_options )

We've discussed this in the past:
https://toolset.com/forums/topic/custom-field/#post-1190447

4. Person Participations:
This post type will hold the information/record of each person's participation in an event, in a particular role ("judge", "owner", "handler", "breeder" etc).

5. Dog Participations:
This post type will hold the information/record of each dog's participation in an event, and the position/place and award that was secured (if any).

B). Post Relationships:

1. Dog -> Persons (breeders):
Since you mentioned that each dog can have multiple persons as breeders, you can create a one-to-many relationship between them.

2. Events -> Person Participations:
Each person's participation record can be related to only one event, so you'll create a one-to-many relationship between them.

3. Person Participations <-> Persons:
Multiple persons can participate in an event in multiple roles, so you'll create a many-to-many relationship between them.

4. Events -> Dog Participations:
Each dog's participation record can be related to only one event, so you'll create a one-to-many relationship between them.

5. Dogs -> Dog Participations:
Each dog's participation record can be related to only one dog, so you'll create a one-to-many relationship between them.

With this basic structure of post types and post relationships, you'll have a simplified foundation for storing different data items, in a logical and easy-to-retrieve way.

In summary, the static/fixed data for persons, events, and dogs should be saved in custom fields in their respective post types.

The data items which will change with respect to events should be saved in their relevant participation post types.

I hope this makes sense and please let me know if any point is not clear.

regards,
Waqar

#1487655

thankyou waqar , you make it sound so easy!!
where would i begin ? do i delete all the views post types etc currently on my site? if so what is the easiest way to reset my site ?
do l leave the views and edit them ? this sounds a thankless task and will take me many many weeks i worry.... thank you again waqar

#1488641

You're very welcome Martin.

The way I'll proceed with this, I would start with a freshly installed WordPress website on a different location so that the old website is available for reference but doesn't interfere with the new building process.

Once everything is working and ready on that new location, you can move it to the actual website's location.

If you feel old website is no longer needed and you'd like to start the re-build process on the actual website's location, there are a number of WordPress plugins available, which can reset everything:
https://wordpress.org/plugins/wp-reset/
https://wordpress.org/plugins/advanced-wp-reset/

I'll not recommend keeping the old views, post relationships, custom fields and post types etc, because they're cluttered and were designed with a different structure in mind.

I'm confident that this re-build process won't take as much time as it took the first time, because you're more experienced and familiar with how Toolset components work and the structure is more simplified and aligned with the requirements.

Additional Tip: In your existing website, I recall you used PHP template files for the single post pages, which can slow you down. You can use content templates for single post pages, which will save you from working with PHP code directly.
( ref: https://toolset.com/documentation/getting-started-with-toolset/create-templates-to-display-custom-posts/ )

My best wishes and please keep your questions coming in the form of new tickets.