XF 1.3 "base_template_modification_edit" form action is undefined

netrix

Active member
When I try to edit/add a Templatemodification I got the problem that I can't save or test it, cause the HTML looks like this.
HTML:
<form id="templateEditor" action="undefined" class="xenForm formOverlay PrimaryTemplateOnly AutoValidator" data-redirect="yes" method="post">
The action is undefined. This HTML is generated by this code.
Code:
<xen:form action="{xen:adminlink '{$prefix}/save', $modification}" class="AutoValidator" data-redirect="yes">
I've inserted this code below to test the thing for the action argument which worked just fine.
Code:
{xen:adminlink '{$prefix}/save', $modification}
 
The first bit of code you pasted isn't related to the code you highlighted elsewhere -- it's for the template editor, not template modifications.

So are you actually having problems editing templates? I would recommend disabling all add-ons and reimporting the master data (<url>/install/). If you still have problems, please confirm with another browser as well.
 
When I try to save a templatemodification I get this message.
Tested with Firefox 31 and Internet Explorer 11.
tmserr.webp
This is what the Dev Tool shows me with the listener option set to false:
Code:
$config['enableListeners'] = false;
Before and after I made disabled the listeners I imported the master data, just to see if it changes anything.
tmserr_html.webp
I thought that this
Code:
{xen:adminlink '{$prefix}/save', $modification}
might not deliver valid data so I added this in the same template after the form-tag and before the script-tag
Code:
<span>{xen:adminlink '{$prefix}/save', $modification}</span>
Which showed me the required URL.
Then I replaced this code in the template
Code:
<xen:form action="{xen:adminlink '{$prefix}/save', $modification}" class="AutoValidator" data-redirect="yes">
with this code
Code:
<form id="templateEditor" action="{xen:adminlink '{$prefix}/save', $modification}" class="xenForm formOverlay PrimaryTemplateOnly AutoValidator" data-redirect="yes" method="post">
that fixed the error, but in my view this in not a good way of fixing the problem.
 
Please disable all add-ons through the control panel. The option you're using is mostly to let you get back into the control panel and does not remove all of their behaviors. Please also do the data rebuild as mentioned.

You have output on that page that isn't actually in the template (aside from the form tag mentioned, a style_id input isn't something in the template modifications).
 
Top Bottom