在 Powermail 中首次提交后无法设置重定向页面

问题描述

启用双重选择加入功能后,我无法在第一次提交到确认页面后设置任何重定向。 这个问题在我的网站上已经存在很长时间了,我无法解决

首先我在 \typo3conf\ext\powermail\Resources\Private\Templates\Form\Create.html 中实现了重定向 看起来像这样:

<f:section name="main">
    <f:alias map="{flashMessageClass:'powermail_message_error'}">
        <f:render partial="Misc/FlashMessages" arguments="{_all}" />
    </f:alias>


    <div class="{settings.styles.framework.createClasses}" data-powermail-form="{mail.form.uid}">
        <f:if condition="{optinActive}">
            <f:else>
                <vh:misc.variables mail="{mail}">
                    <f:format.html parseFuncTSPath="lib.parseFunc_RTE">{powermail_rte}</f:format.html>
                </vh:misc.variables>

                <f:render partial="Misc/GoogleAdwordsConversion" />
            </f:else>
            <f:then>
                <strong>processing...</strong>
                <script type="text/javascript">
                    window.location = "https://example.com/";
                </script>
            </f:then>
        </f:if>
    </div>
</f:section>
当 JavaScript 代码在流体 if 语句中运行时,就会发生重定向。 该页面将被重定向https://example.com

但是这个重定向并没有像预期的那样工作,因为页面会先加载,然后脚本会在之后运行,这会导致一个小的延迟。 此重定向的第二个问题是实现正在更改 Powermail 扩展中的文件,这些文件很容易被覆盖。

有没有可能把重定向做得更好?

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)