Save and Copy not working correctly?

By Chris - April 30, 2014

Hi rez,

I think I have a solution. Can you try making this change to the plugin to see if it fixes the problem?

In saveAndCopy.php, change line 22:

$button = '<input type="button" name="action=save" value="' .t('Save & Copy'). '" onclick="window.SAVE_AS_COPY_CLICKED=true; $(\'form\').submit();" class="button" />';

...adding this new code:

$button = '<input type="button" name="action=save" value="' .t('Save & Copy'). '" onclick="window.SAVE_AS_COPY_CLICKED=true; $(\'form\')[0].onsubmit(); $(\'form\').submit();" class="button" />';

Does that solve the problem? Please let me know and I will patch the add on. Thanks!

All the best,
Chris

By rez - April 30, 2014

Yes, it appears to work correctly with your fix. Thanks for the fast response, Chris!