7 years ago
2
Topic

Hi to all!

First -thanks to devs for great last updates.

I don't know if it is a bug or I have to set some new settings but I found the following problem: if I create a SEBLOD Form Module in Article Menu type, this form has action '/component/cck' without some depend on Redirect setting. For now I found that this problem exists for such Menu types as Article and Featured Articles. Tried on J!3.5.2+S3.8.2.

Thanks if smbdy can help me!

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
1
Level 1

Hi,

I can confirm redirects work in a weird way when submited from module (but redirect itself works, just urls are weird), e.g. I got this with redirection set to form-edition:

from article page

index.php/en/component/cck/form/fields_testing?id=104&Itemid=152&thanks=fields_testing

from seblod search page

index.php/en/gallery-search/form/fields_testing?id=105&thanks=fields_testing

from seblod component (not module)

index.php/en/fields-test-form/form/fields_testing?id=106&thanks=fields_testing

Probably we should have menu selector in the form settings, the same way as we do on links

7 years ago
0
Level 2

Thanks, Klas, for answer.

Really, the most cases of using such froms in modules is sending messages or something similar with redirect to current page. My form is existing on all pages of site - so, I can't choose any menu item in form setting.

About your test - in my case link is '/component/cck' without some postfixes... I found also that another guys can't replay my case - they have normal link...

I tried to change module template with this code:

$app = JFactory::getApplication();

$menu = $app->getMenu();

$menuItem = $menu->getActive();

$uri = JUri::getInstance($menuItem->link);

$query = $uri->getQuery(true);

if (isset($query['option']) && isset($query['view']) && $query['option'] == 'com_content' && isset($query['view']) == 'article') {

$comp = 'com_content';

} else {

$comp = 'com_cck';

}

echo ( $config['action'] ) ? $config['action'] : '<form action="' . JRoute::_('index.php?option=' . $comp) . '" autocomplete="off" enctype="multipart/form-data" method="post" id="' . $formId . '" name="' . $formId . '">';

Link is correct with this code, but submit redirects to 404 page.

I need temporally solution for this time...

Get a VIP membership