For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
Please see our announcement here.
Which link do you mean exactly - element custom link, edit-link in list?
How does your workflow look like in terms of "referer url is from another address"?
I had check there is no list_xx.js put in place for that list is that any where that i can check ?It would be good to get the php plugin run properly rather than making this kind of workaround.
Of course you could e.g. replace list edit button with your own, then get the document.referrer and depending on that have either regular link or Fabriks modal link on your buttons click event.
The code could be in list_xx.js
It doesn't exist by default and needs to be created. And xx replaced with your list id.
http://www.fabrikar.com/forums/index.php?wiki/javascript/
Here's some info on opening links in modal window:
https://fabrikar.com/forums/index.php?wiki/javascript-window-class/