Custom link not recognizing placeholders

gnavarro

Member
Hi,

My config:
Fabrik 3.3.4
Joomla! 3.4.5
Template - Protostar
Updated from github
Access to site admin in my Fabrik account

Don't understand why but the custom link for one of my fields is not recognizing the placeholder(s), when clicked is returning empty in the url!

List:
http://www.fisiolar.pt/index.php/pt/sessoes-de-tratamento-secretariado

Field With custom link:
googlecalendar_link

Custome Link:
Code:
https://calendar.google.com/calendar/b/1/render?action=TEMPLATE&text=Consulta+a+{fb_sessoes_fisioterapia___id_pac}&dates=20151107T120000/20151107T120000&details=teste&sprop=website:www.fisiolar.pt&location=Videochamada&pli=1&sf=true&output=xml#eventpage_6

Am I missing something?

Please advise... Thanks in advance.
 
Can't see this field in this list.

Which element type is googlecalendar_link?
Which element type is id_pac?
Which link do you get?
Did you try with id_pac_raw?
 
Hi Troester,

You should now see the field in the list.

googlecalendar_link is field
id_pac is databasejoin

I get the following link:
Code:
https://calendar.google.com/calendar/b/1/render?action=TEMPLATE&text=Consulta+a+&dates=20151107T120000/20151107T120000&details=teste&sprop=website:www.fisiolar.pt&location=Videochamada&pli=1&sf=true&output=xml#eventpage_6
... And I should get:
Code:
https://calendar.google.com/calendar/b/1/render?action=TEMPLATE&text=Consulta+a+{LABEL OF ID_PAC FIELD}&dates=20151107T120000/20151107T120000&details=teste&sprop=website:www.fisiolar.pt&location=Videochamada&pli=1&sf=true&output=xml#eventpage_6

Yes I've tried with raw and does not work also, but I want to get the label and not the id of the field.
 
Strange!

This is what I see with the fabrik account
Please try to logout and in again...
 

Attachments

  • 2015-11-19 (2).png
    2015-11-19 (2).png
    76.8 KB · Views: 250
Last edited:
Seems you've changed the element access meanwhile. I had to log out and in again to see this:(

Your element id_pac is not in list view.
Is it set to "include in list query" (which is the default)?
 
Your correct! It was not included in list query... sorry for wasting your time on this... I must be more accurate when looking through hipotetical issues.

Enviado do meu SM-N9005 atrav?s de Tapatalk
 
Troester,

I'm shore now I've found a bug.

When an element is in the list it will create an error in custom link. In other words I've included as placeholder {fb_sessoes_fisioterapia___user_id_fisiot} in the custom link, but once is in list view it will create a strange link and does not work as expected (see attached image), if I remove fb_sessoes_fisioterapia___user_id_fisiot from the list the custom link will be ok!

Please tell me your thoughts about this... What should I try to do?
 

Attachments

  • 2015-11-19-(2).jpg
    2015-11-19-(2).jpg
    261.7 KB · Views: 247
You can only use a placeholder in the custom link if the element content is "URL compatible", so no spaces, no special characters, not a HTML link (as it is if set to "Link to details") etc.

You can add a calc element and create a valid URL yourself.
 
Are you using that element as a detail / custom link? Under the element list settings.
Hugh, I'm not shore what you mean with "that element as a detail / custom link". If you are referring to fb_sessoes_fisioterapia___user_id_fisiot this element is defined to show in list and yes, also with custom link.

You can only use a placeholder in the custom link if the element content is "URL compatible", so no spaces, no special characters, not a HTML link (as it is if set to "Link to details") etc.

You can add a calc element and create a valid URL yourself.

Troester, so it will work only if I remove the custom link from fb_sessoes_fisioterapia___user_id_fisiot or use a clean element.... Got it... Thanks


Just a few more questions...

  1. Is it possible to get the label from a Dropdown directly to an mysql query? I ask this because I need the label value from a dropdown that is in a different form and I think that is not possible to get into a custom link placeholders from other forms.
  2. Also I think that there is the possibility to use the list join and then use the placeholder directly in the custom link but wold not list joins have direct impact on list performance? I had to remove all cdd from my list because it took ages form my list to load and I don't now if list joins have the same impact.
  3. If list joins are the perfect tool to cross forms data without direct impact on my lists performance... Can I delete the unwanted crossed fields or I just can unpublished them? Till now I have been creating new fields and populate them with other forms data using mysql queries on form once I think that is the best solution for performance but the list/table increases the number of columns.
Please tel me your thoughts about these questions... Thanks in advance
 
Unfortunately, at the point placeholders are done when building the list links, it's kind of a catch 22, the if you use an element as a placeholder to build a link which is itself being used as a link, it may have already been formatted as a link. This is something we want to fix (by maintaining a set of element data which we don't modify and just use for placehokders) but it's not trivial to do.

Re drop down labels, no it's not easy to get those as they are stored in the Fabrik meta data tables, in JSON format. You should consider converting your drop down elements to joins, and store your value/label in a data table.

Slow loading of CDD's is invariably caused by your data not being normalized correctly, with a non unique foreign key. Correctly configured joins and CDD's should have no impact on performance, unless you are trying to create drop downs (or whatever) with a huge number of options.

So you should really take a step back and rethink your table structure, and work out what us causing the problems. I work on lots of sites with a huge number of joins to tables with millions of rows. As long as the structure makes sense, performance is not a problem.

Hugh





Sent from my HTC One using Tapatalk
 
So to cross data between tables the best solution is to apply list joins... ok I will slowly rethink my structure... eliminate fields that are populated with other lists data through on submit queries and use the joins. That will be a litle bit confusing... I will start to have a lot of grups and elements :)

Thanks for your support and consultancy!

Enviado do meu SM-N9005 atrav?s de Tapatalk
 
Hugh,

I'm trying to make a inner join for th list fb_sessoes_fisioterapia (fb_sessoes_fisioterapia to fb_tratamento_fisiot => id_tratamento to id => multiple records to one record) as you can see in the attached img... but the list fb_sessoes_fisioterapia stops loading and I?ve got to delete the join for it to load again.

If I make the inverse join in the fb_tratamento_fisiot (fb_tratamento_fisiot to fb_sessoes_fisioterapia => id to id_tratamento => one record to multiple records) it works!

Am I missing something? Thanks in advance.
 

Attachments

  • list_join.jpg
    list_join.jpg
    86.3 KB · Views: 178
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top