WP Recipes
recipe instructions not being posted/remembered (4 posts)

  1. MBAngel
    Posted 3 years ago #

    I added ten instructions to a recipie, saved, and only the first and last instruction were saved... Can anyone help me figure out why?


    The instructions are not being saved to the database, except the ones it shows...

  2. MBAngel
    Posted 3 years ago #

    This seems to be an abandoned project. no one is answering any forum posts about it, there's no way to contact the author, and it's buggy. I'm willing to pay to have this fixed to fit me needs...

  3. MBAngel
    Posted 3 years ago #

    Ok, to update... I've found if I add one instruction, hit save, and add another, it seems to be saving them...

    That seems to put it in this javascript code...

    <script type="text/javascript">
        jQuery("button.instructionDelete").live('click', function() {
          if (jQuery("table#instructions tr").length <= 2) {
            alert("At least one instruction is needed!");
          else {
    //        alert("Deleted :)");
            jQuery(this).parent().parent().fadeOut('20000', function(){
          return false;
        jQuery("button#instructionAdd").live('click', function() {
          var instrLastID = parseInt(jQuery("table#instructions tr").last().attr("id").replace("instruction-", ""));
          var instrLastNo = parseInt(jQuery("table#instructions tr").last().find("td.colInstrItem").text());
          var instrNewID = parseInt(instrLastID+1);
          var newRow =  '\
            <tr id="instruction-' + instrNewID + '">\
              <td class="colInstrItem">' + parseInt(instrLastNo+1) + '</td>\
              <td class="colInstrTitle">\
                <input type="text" class="instrTitle" name="_my_meta[recipeInstruction][' + instrNewID + '][title]" value="">\
              <td class="colInstrActions">\
                <button class="instructionDelete">X</button>\
    //      alert(newRow)
    //      alert("last ingredient id: " + instrLastID + "\nnew ingredient id: " + instrNewID)
          jQuery("table#instructions tbody").append(newRow);
          return false;
  4. Niekje
    Posted 3 years ago #

    Sorry for the late reply, I was encountering the same problem and looked trough the plugin file at the following line

    //      alert("last ingredient id: " + instrLastID + "\nnew ingredient id: " + instrNewID)

    You can see he used ingredient 2 times in this line instead of instruction, replace the ingredient with instruction and it should all work fine.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Recipes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic