impossible to delete existing faq

Please report bugs here!

Moderator: Thorsten

Post Reply
oloccina
Posts: 14
Joined: Tue Feb 14, 2012 3:13 pm

impossible to delete existing faq

Post by oloccina »

Hello,
in my phpMyFAQ 2.8.7
it's not possible to delete the faq clicking on the red "trash" icon

in chrome console I see this error

Uncaught ReferenceError: deleteRecord is not defined ?action=view:734


thank you,
nic
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: impossible to delete existing faq

Post by Thorsten »

Hi,

checked on my local installation, did you upgrade from an older version? Maybe a JS file is missing?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
oloccina
Posts: 14
Joined: Tue Feb 14, 2012 3:13 pm

Re: impossible to delete existing faq

Post by oloccina »

Hi,
yep I upgraded from a 2.7.x version
the upgrade went smoothly.

any suggestion on how to find the missing file,
maybe overwrite everything again manually?

thank you
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: impossible to delete existing faq

Post by Thorsten »

Hi,

it's in admin/record.show.php, line 550

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
oloccina
Posts: 14
Joined: Tue Feb 14, 2012 3:13 pm

Re: impossible to delete existing faq

Post by oloccina »

yes, i can see that file , permission 644

and the code

Code: Select all

  /**
         * Ajax call for deleting records
         *
         * @param record_id   Record id
         * @param record_lang Record language
         *
         * @return void
         */
        function deleteRecord(record_id, record_lang)
        {
            if (confirm('<?php print addslashes($PMF_LANG["ad_entry_del_1"] . " " . $PMF_LANG["ad_entry_del_3"]); ?>')) {
                $('#saving_data_indicator').html('<img src="images/indicator.gif" /> deleting ...');
                $.ajax({
                    type:    "POST",
                    url:     "index.php?action=ajax&ajax=records&ajaxaction=delete_record",
                    data:    "record_id=" + record_id + "&record_lang=" + record_lang,
                    success: function(msg) {
                        $("#record_" + record_id + "_" + record_lang).fadeOut("slow");
                        $('#saving_data_indicator').html('<?php print $PMF_LANG['ad_entry_delsuc']; ?>');
                    }
                });
            }
        }

        /* ]]> */
is there too
oloccina
Posts: 14
Joined: Tue Feb 14, 2012 3:13 pm

Re: impossible to delete existing faq

Post by oloccina »

I can give you admin access if you have time to investigate this
Post Reply