• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Custom URL with J! SEF URL's ON

henk

Member
I have a list where I need to use a custom link for the form (add & edit)
index.php?option=com_fabrik&task=form.view&formid=104&rowid=
This is only working for the backend and not for the frontend, because the link is translated in .../form.view/104/ resulting in a 404 error
If I change the link to index.php?option=com_fabrik&task=form&formid=104&rowid=
then it works in the frontend, because the link is translated in .../form/104/, but now it does not work in the backend
I can only get this working with the Joomla SEF URLs turned off.
Or I need to accept only to add/edit in the frontend.

Is there any other way to get this working for both front- and backend with Joomla SEF URLs turned ON?
 
Yes, I tried that but than it works in the frontend and NOT in the backend.
So I must make my choice

Henk
 
You said you tried ...

index.php?option=com_fabrik&task=form&formid=104&rowid=

... ie. task-form no not view=form.

I could have sworn I'd added some code a while back that detected a front end link when on the back end, and modified from view=form to task=form.view. But I'm not seeing it. Maybe I imagined it.

-- hugh
 
Well I tried both view=form and task=form.
They both work in the frontend, but only task=form.view works in the backend.
Strange is that for a list without a custom link we have the view=form in the frontend and task=form.view in the backend.

Temporary I can solve the issue on my site by using sh404sef, but this should not be needed.

henk
 
They both work in the frontend, but only task=form.view works in the backend.

It's a known issue, although I thought I'd provided a workaround a while back. The problem is the difference the way J! links have to be built on the front end (view=foo) and backend (task=foo.view). That's not a Fabrik thing, it's a J! thing.

Strange is that for a list without a custom link we have the view=form in the frontend and task=form.view in the backend.

Well, for form/details links that we generate, we know if we're rendering on the front or back end, and we know we're generating a J! view link ... so we know whether to use the front end (view=foo) or backend (task=foo.view) form of link, and we know not to try and build the SEF routed link if we're on the backend.

For custom links, we have no a-priori knowledge of what link you are building. It could be a non-Joomla link, or it could be a link to another J! component, or it could be a Fabrik link. And we don't really know if you want to generate a front or backend link. Some people want to direct the view link to the front end.

I'm working now on the solution I thought I'd added a while back, which lets you specify {formview}, {listview} or {detailsview} as placeholders in your link, and we replace that with the appropriate text. So ...

Code:
index.php?option=com_fabrik&{formview}&formid=123

... will render as &view=form on the front end and &task=form.view on the back end.

I'm just testing atm, hopefully commit something soon.

-- hugh
 
OK, as of this commit:

https://github.com/Fabrik/fabrik/commit/ff8e9c0b369ed6b3e7b69ddda65c8fe3dcec8b88

... you should be able to use {formview} as a placeholder in links.

I still have a sneaky feeling I already added a fix for this somewhere, but can't for the life of me remember how/where I did it. Although again, it's possible I may just have dreamed doing it. Which does happen, I come up with solutions and fixes while I'm going to sleep.

-- hugh
 
Ah, this sounds like a real good solution, many thanks.

I just tested it and it works perfect for the form edit link:
working on both ends: index.php?option=com_fabrik&{formview}&formid=113&rowid={rowid}. This will give .../form/113/
For the form ADD link however there is an issue:
index.php?option=com_fabrik&{formview}&formid=113. This will give .../form=/113/ and this is not working on both ends.

I don't see where this extra = is comming from; its not in the code you comitted.
Do I need to use a different link for the add? I tried several, but no success.

-henk
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top