1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Joining to view

Discussion in 'Community Help (users helping users)' started by PaulV888, Mar 16, 2023.

  1. PaulV888

    PaulV888 Member

    Level: Community
    When joining to a view this message "COM_FABRIK_LIST_JOIN_NO_PK_USED_ID" is shown. However this shows in the front-end now as well. Which it didn't use to do.

    It there a way to suppress it?

    Thanks,
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    What is your exact setup?
    Joining from ... to...
    Which columns are in your view?
    Do you have a list pointing to this view?

    The language text should show
    COM_FABRIK_LIST_JOIN_NO_PK_USED_ID="A join or list has been added which has no Primary Key (PK). Most likely cause is you are creating a new List on a MySQL view, or a join element joining to a MySQL view. Views don't have PKs, but as we found a field called 'id' we are assuming this is the PK. If this is the PK, you can ignore this message. If not, if you are creating a list you should manually designate the PK in the list settings now, in the 'Data' tab. If you are adding a join element, you should create a Fabrik List based on the view you are joining to, in order to specify which element to use as the PK, then edit and save the join element again"

    I can see such a message in the backend (with the substituted text) if saving the list with such a join the 1st time. But not in the frontend.
     
    Last edited: Mar 18, 2023
  3. PaulV888

    PaulV888 Member

    Level: Community
    Sorry for not documenting better. I just wanted to put a feeler out there to see if someone else has the same issue. I did run it down last night and this is what I found.
    - I do not have a list pointing to that View, I did see that code as well and I tried that. When setting up a list to the existing view (i.e. pick existing table or view from my second database connection) I did notice the elements are not created automatically anymore. That maybe another issue to investigate some day.
    - Not sure why I got the label instead of the text, didnt look into it since I was trying to make it go away.

    Anyway long story short, V3 seem to to do the same thing and gives that warning in the Front-end. In V3 I had setup a list without a group for that view in it, for performance reasons and to suppress the warning.

    In V4 the issue was when having ; 2 lists with the same name and when using SEF, it was opening the wrong list, even though the menu indicate the correct form number. The link ended up as "/index.php/devices-expert/list/15"
    upload_2023-3-18_11-13-51.png

    I made it go away by renaming the list and after that the router confusion was gone. An even by renaming the form back just now, I cannot reproduce it anymore, looks like something got corrected in the DB.
     

Share This Page