You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the site I'm developing, I have the option to edit your submissions using the Submission Accounts module. I also have a regular user account that is used to view all submissions (view, not edit). This regular user is open to the public so I can easily control what the public sees (I can't use the API to display the submissions on this particular site).
Problem is that if someone logs in to edit their submission and try to view the public listings they get an error that says (* = server path leading to the formtools folder):
Notice: Undefined index: login_page in _/formtools/index.php on line 11
Notice: Undefined index: in */formtools/index.php on line 12
Warning: Cannot modify header information - headers already sent by (output started at */formtools/index.php:11) in _/formtools/index.php on line 12
Thanks for all of your hard work on this.
Steps to reproduce:
Login as a Submission Account
Go to the regular formtools index page
KZeni: I got it working by doing a quick hack of adding the following to /formtools/index.php (lines after 'require_once("global/session_start.php");')
// Start check if submission account
$form_id_str = "";
if (isset($_SESSION["ft"]["account"]["form_id"])){
$form_id_str = "?form_tools_form_id=" . $_SESSION["ft"]["account"]["form_id"];
header("location: $logout_url{$form_id_str}");
}
// End check if submission account
Let me know if there's a better way of doing this, thanks.
Interesting... thanks for posting your fix.
I really hate to update the core code for fixes for custom modules, though.
Frankly this is really an overall design problem. The two account types (Submission Accounts & the Core) SHOULD be entirely independent. It was bad design on my part to combine the two like I did.
I'll put this down as "confirmed", but I'm going to give it some more thought before implementing your fix - or one like it.
Thanks, KZeni!
Ben
The text was updated successfully, but these errors were encountered:
On the site I'm developing, I have the option to edit your submissions using the Submission Accounts module. I also have a regular user account that is used to view all submissions (view, not edit). This regular user is open to the public so I can easily control what the public sees (I can't use the API to display the submissions on this particular site).
Problem is that if someone logs in to edit their submission and try to view the public listings they get an error that says (* = server path leading to the formtools folder):
Notice: Undefined index: login_page in _/formtools/index.php on line 11
Notice: Undefined index: in */formtools/index.php on line 12
Warning: Cannot modify header information - headers already sent by (output started at */formtools/index.php:11) in _/formtools/index.php on line 12
Thanks for all of your hard work on this.
Steps to reproduce:
KZeni: I got it working by doing a quick hack of adding the following to /formtools/index.php (lines after 'require_once("global/session_start.php");')
// Start check if submission account
$form_id_str = "";
if (isset($_SESSION["ft"]["account"]["form_id"])){
$form_id_str = "?form_tools_form_id=" . $_SESSION["ft"]["account"]["form_id"];
$module_settings = ft_get_module_settings("", "submission_accounts");
$logout_url = $module_settings["logout_url"];
$_SESSION["ft"] = array();
header("location: $logout_url{$form_id_str}");
}
// End check if submission account
Let me know if there's a better way of doing this, thanks.
Interesting... thanks for posting your fix.
I really hate to update the core code for fixes for custom modules, though.
Frankly this is really an overall design problem. The two account types (Submission Accounts & the Core) SHOULD be entirely independent. It was bad design on my part to combine the two like I did.
I'll put this down as "confirmed", but I'm going to give it some more thought before implementing your fix - or one like it.
Thanks, KZeni!
The text was updated successfully, but these errors were encountered: