41 Posts
RatingAction
4 years ago
Topic

Hi, I just installed the SD Live CCK field and can't seem to get it to work properly. My use case is as follows: I have a movie database where I have one content type for movies and one for actors. For each movie I select the actors using a Checkbox Dynamic field. The database stores the article alias for each actor based on the Checkbox selection. On the Actor-page I would like to list all movies this actor has starred in. 

To achieve this I have set up a List / Search module that is displayed on the individual actors' pages. As search criteria I have set the following:

  • "Core Content Type": set to "Film" (my content type for movies)
  • "Nebendarsteller" (my checkbox dynamic field that allows me to select the actors): 
    • Live Value set to "SD Live CCK field" and Configure set to "art_alias"
    • Match set to "Any Words Exact", Collection "None", Separator ",", Comparison rule "Quoted", Comparison Mode "Multiple", Match Occurences "None"

However, on each actor page all movies in my database are displayed, regardless of whether they have been selected or not. Where am I going wrong?

Get a VIP membership
1283 Posts
Bucklash
4 years ago
7
Level 1

so in your film form,

you select actors...

be best to store the id’s rather than alias ...

in db, you have data stored as abc,def,ghi

in your search for the list module, for the actors field you have match set as?

41 Posts
RatingAction
4 years ago
6
Level 2

I changed storage from alias to id, in case it makes a difference and changed the configuration for the live value to "id" instead of "art_alias". Result is still the same, though. For one movie this is now what's stored in the actors field: 18,17,19,14,16,15

Match settings are as follows:

  • Match set to "Any Words Exact"
  • Collection "None"
  • Separator ","
  • Comparison rule "Quoted"
  • Comparison Mode "Multiple"
  • Match Occurences "None"

1283 Posts
Bucklash
4 years ago
5
Level 3

Do unquoted.

Turn on debug in searches template config.

Post query here.

You are aiming to have a list of the films related to the actors in the current movie, that right?

41 Posts
RatingAction
4 years ago
4
Level 4

Changed to "unquoted", result is the same. This is the Debug Ouput:

0.000 seconds (0.000); 5.44 MB (5.435) - beforeSearch

SELECT t0.id AS pid,t0.pk AS pk,t0.pkb AS pkb,t0.parent_id AS parent,t0.author_id AS author,t0.author_session AS author_session,t0.cck AS cck,t0.storage_location AS loc,tt.id AS type_id,tt.alias AS type_alias
FROM `#__cck_core` AS t0
LEFT JOIN `#__content` AS t1 ON t1.id = t0.pk
LEFT JOIN `#__cck_core_types` AS tt ON tt.name = t0.cck
WHERE t1.state = 1
AND t1.access IN (1,1,5)
AND ( t1.publish_up = '0000-00-00 00:00:00' OR t1.publish_up <= '2019-07-08 12:10' )
AND ( t1.publish_down = '0000-00-00 00:00:00' OR t1.publish_down >= '2019-07-08 12:10' )
AND t0.cck = 'film'
ORDER BY t1.title ASC
LIMIT 25

0.001 seconds (0.001); 5.48 MB (0.040) - afterSearch [Cache=OFF] = 17 results.
0.796 seconds (0.795); 5.96 MB (0.483) - afterRender [Cache=OFF]

1283 Posts
Bucklash
4 years ago
3
Level 5

Ah, just reread, you are on actor page, and getting all of their movies....

anyway, Seems like sd cck field not picking up any value at all.

What is setting for sd cck field?

41 Posts
RatingAction
4 years ago
2
Level 6

I set it to "id" after changing the storage of the checkbox dynamic.

You can see an example for the search here (list below the text): https://www.ratingaction.com/index.php/filme-und-mehr/schauspieler/alyssa-milano

It should only show the movie "Phantom Kommando" but shows the entire list

1283 Posts
Bucklash
4 years ago
1
Level 7

So you reference, in the movie, the actors involved.

You store the article id of the actor article.

In your sd cck field, you are targeting the field in the content type. This would likely be "art_id".

This field should be in your actor view as well (I imagine)

41 Posts
RatingAction
4 years ago
0
Level 8

This worked now, thanks a lot, Bucklash! I actually hadn't add the art_id field to the actor's content view before. Added it to the content view in the hidden section and it works now.

The only remaining issue I have with this now is in the movie view: The field lists the individual actors, but I haven't figured out how to add links to the the actors' articles. Any ideas?

1283 Posts
Bucklash
4 years ago
5
Level 1

Funky.

One way would be to ( in item view using seb_minima or slicked_minima ;) ) have an override that does required rendering stuff.

requires php knowledge though

can help but not today

there are other ways...

41 Posts
RatingAction
4 years ago
4
Level 2

Ok, thanks for the pointer. I will try to figure it out and report back.

And thanks a million for your help on the bigger problem of selecting the list properly! I really appreciate you taking the time and helping me out.

Looking at your website I see you're a musician in your day job? That's awesome! I play the bass guitar, but purely amateur. Our first gig will be my 40th birthday party later this year.

1283 Posts
Bucklash
4 years ago
3
Level 3

Coolio

I just started a Gypsy Jazz Duo. That stuff is pretty groovy.

First gig eh? Gotta get blind drunk and fall off stage, is the law! :D

Re my last post, probably a bit over kill... have set the link to view etc? 

41 Posts
RatingAction
4 years ago
2
Level 4

So guitar + violin? Do you have any performances up on Youtube, yet? We play mainly Jazz standards (Autumn Leaves, Beautiful Love and the likes) and some stuff that's a bit more funky, like Herbie Hancock. It's definitely great fun!

On the links: Yes, tried all that. I only get it to display either one link to the film article I'm on across all actors or no link at all. Haven't found any setting that separates the links by posted content article, yet. So possibly the php route was not ott after all. Will be a learning experience! :-)

1283 Posts
Bucklash
4 years ago
1
Level 5

ah there are some vids out there but not one’s i wanna rave about.

Yeah we touch on the standards but prob not herbie.

yeah just geetar and violin.

What about self, any vids?

41 Posts
RatingAction
4 years ago
0
Level 6

Not yet, hopefully after my b'day party provided we don't screw it up :-)

41 Posts
RatingAction
4 years ago
0
Level 1

I found a workaround for my display related article links problem. It's not very elegant, but it works.

I set up two field per related article type (in my example two each for actors and for directors): One is a Field X of related articles pointed to the category I want and the other is a checkbox dynamic field.

In the admin view I have both fields, so I have to enter actors and directors twice per film: Once as checkbox selection and once as Field X / related articles.

In the content view I put the Field X in the position where I want to display the list of actors or directors. The Field X of related articles is automatically rendered with correct links to the actor / director articles. The checkbox selection I put in the "Hidden" position. This is only needed to automatically populate the lists on the actor / director pages.

I appreciate that this may be too cumbersome for user-driven sites where users woudln't understand why they need to put in the same information twice. But for my purposes (I am the only one entering info) it does what I want it to and I don't have to spend more time trying to find a solution.

Get a Book for SEBLOD