[SOLVED] Problem with flexicontent router and own component

More
3 years 11 months ago - 3 years 11 months ago #48574 by Jiwoks
Hi,

I'm a component developper and I had an issue using my own component with flexicontent. It would be nice if we could speak about it.

My component uses a system plugin to check the route followed by the current user.
My component checks the segments and if the first one corresponds to what we want, it sets some request values through JRequest like 'option', 'task', 'id' to correspond to my component.

The problem I have encountered is that Flexicontent parses the route too through the file router.php.

But if the route doesn't correspond to any known flexicontent route it throws a 404 error and then stops the process.

But it doesn't let the ability to other components to check the route and maybe render something, it's my case.

Line 332 on the file http://code.google.com/p/flexicontent/s ... router.php

Am I the only one to be concerned?

In my case I just had to remove the lines 333 and 334 and replace it by:
return $vars;

But it would be nice to find a solution without hacking something like that.

Regards.

Damien
Last edit: 3 years 11 months ago by Jiwoks.

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #48575 by ggppdk
Hello

please consider and answer these

1. why did Joomla route the current URL to the FLEXIcontent component ?
... so the activated menu item is a FLEXIcontent menu item,

why did your component activate a FLEXIcontent menu item in the generated URL ? !


2. which view is FLEXIcontent supposed to show ?? if the "requested" view is invalid


i think that maybe you are doing something wrong ?
or you maybe you are making a wrong assumption as to how the router.php should behave ?

but of course we may be wrong in something, please answer the above 2 questions and we can discuss this further :) ;)


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #48602 by Jiwoks
Hi,

Thanks for your reply, of course I can answer to this questions.

1/ The home page uses a flexicontent view, the list of categories.

2/ Flexicontent isn't supposed to show a view.

My component generates an URL which can be customized by the administrator like:
http://exemple.com/foobar_defined_by_admin/ {(int)my_component_category_id}/{(string)my_category_alias} /{(int)my_component_item_id}/{(string)my_component_item_alias}

So foobar_defined_by_admin doesn't exists neither as a menu link nor as a flexicontent url.

Best regards.

Damien

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #48603 by ggppdk
Hello

i guess you tried with our latest package (version v2.2.0 r1932)

1/ The home page uses a flexicontent view, the list of categories.

2/ Flexicontent isn't supposed to show a view.



i am little confused, is the view a valid FLEXIcontent view or is it not ?


- if it is not a valid FLEXIcontent view,
then it is a bad URL for our router.php,
... changing router.php to does not seem right approach since a non valid view was detected


Questions:
1. why are you using a FLEXIcontent menu item as your home page, if FLEXIcontent is not supposed to show anything ?


2. why not use some other component as menu item of Home page ?


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #48622 by Jiwoks
Hello,

While I was replying, I found the solution.
In fact I missed to do something in my system plugin.
I had to reset the uri passed to the replaceRoute method.
In this way the uri path is empty and is not anymore parse by Flexicontent.

Thanks for your time.

Best regards.

Damien

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #48623 by ggppdk
Hello

ok, thanks for feedback


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.