Support » Plugin: WP Recipes » [Plugin: WP Recipes] recipe instructions not being posted/remembered

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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…

    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().addClass("delete");
            jQuery(this).parent().parent().fadeOut('20000', function(){
              jQuery(this).find("input").val("");
            });
          }
          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>\
              <td class="colInstrActions">\
                <button class="instructionDelete">X</button>\
              </td>\
            </tr>\
          ';
    
    //      alert(newRow)
    //      alert("last ingredient id: " + instrLastID + "\nnew ingredient id: " + instrNewID)
    
          jQuery("table#instructions tbody").append(newRow);
          return false;
        })
      </script>

    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.

    Goodluck!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Recipes] recipe instructions not being posted/remembered’ is closed to new replies.