Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    The problem was mod_security. added this to my whitelist.conf:

    <LocationMatch "/wp-admin/post.php">
      SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904
      SecRuleRemoveById phpids-17
      SecRuleRemoveById phpids-20
      SecRuleRemoveById phpids-21
      SecRuleRemoveById phpids-30
      SecRuleRemoveById phpids-61
    </LocationMatch>
    
    <LocationMatch "/wp-admin/admin-ajax.php">
      SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904
      SecRuleRemoveById phpids-17
      SecRuleRemoveById phpids-20
      SecRuleRemoveById phpids-21
      SecRuleRemoveById phpids-30
      SecRuleRemoveById phpids-61
    </LocationMatch>
    
    <LocationMatch "/wp-admin/page.php">
      SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904
      SecRuleRemoveById phpids-17
      SecRuleRemoveById phpids-20
      SecRuleRemoveById phpids-21
      SecRuleRemoveById phpids-30
      SecRuleRemoveById phpids-61
    </LocationMatch>
    
    <LocationMatch "/wp-admin/options.php">
      SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904
      SecRuleRemoveById phpids-17
      SecRuleRemoveById phpids-20
      SecRuleRemoveById phpids-21
      SecRuleRemoveById phpids-30
      SecRuleRemoveById phpids-61
    </LocationMatch>
    
    <LocationMatch "/wp-admin/theme-editor.php">
      SecRuleRemoveById 300015 300016 300017 950907 950005 950006 960008 960011 960904
      SecRuleRemoveById phpids-17
      SecRuleRemoveById phpids-20
      SecRuleRemoveById phpids-21
      SecRuleRemoveById phpids-30
      SecRuleRemoveById phpids-61
    </LocationMatch>
    
    <LocationMatch "/wp-includes/">
      SecRuleRemoveById 960010 960012 950006
      SecRuleRemoveById phpids-17
      SecRuleRemoveById phpids-20
      SecRuleRemoveById phpids-21
      SecRuleRemoveById phpids-30
      SecRuleRemoveById phpids-61
    </LocationMatch>
    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    Did more digging. here is the response I’m getting from Ajax when I’m trying to enter a tag:

    <html><script language="JavaScript"> var tokenName = 'CSRF_TOKEN'; var tokenValue = 'f07b55cd7b228fdcbbadc8cf7c7b434defc816cd'; function updateTags() { var all = document.all ? document.all : document.getElementsByTagName('*'); var len = all.length; for(var i=0; i<len; i++) { var e = all[i]; updateTag(e, 'src'); updateTag(e, 'href'); } } function updateForms() { var forms = document.getElementsByTagName('form'); for(i=0; i<forms.length; i++) { var html = forms[i].innerHTML; html += '<input type=hidden name=' + tokenName + ' value=' + tokenValue + ' />'; forms[i].innerHTML = html; } } function updateTag(element, attr) { var location = element.getAttribute(attr); if(location != null && location != '' && isHttpLink(location)) { var index = location.indexOf('?'); if(index != -1) { location = location + '&' + tokenName + '=' + tokenValue; } else { location = location + '?' + tokenName + '=' + tokenValue; } element.setAttribute(attr, location); } } function isHttpLink(src) { var result = 0; if(src.substring(0, 4) != 'http' || src.substring(0, 1) == '/') { result = 1; } return result; } updateTags(); updateForms(); </script></html>

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    More digging. here is the response when trying to put tags in:
    ‘Circle 5
    Circle Pad
    Circle Pad Attachment
    Circle Pad Pro
    Naval War Arctic Circle<html><script language=”JavaScript”> var tokenName = ‘CSRF_TOKEN’; var tokenValue = ‘f07b55cd7b228fdcbbadc8cf7c7b434defc816cd’; function updateTags() { var all = document.all ? document.all : document.getElementsByTagName(‘*’); var len = all.length; for(var i=0; i<len; i++) { var e = all[i]; updateTag(e, ‘src’); updateTag(e, ‘href’); } } function updateForms() { var forms = document.getElementsByTagName(‘form’); for(i=0; i<forms.length; i++) { var html = forms[i].innerHTML; html += ‘<input type=hidden name=’ + tokenName + ‘ value=’ + tokenValue + ‘ />’; forms[i].innerHTML = html; } } function updateTag(element, attr) { var location = element.getAttribute(attr); if(location != null && location != ” && isHttpLink(location)) { var index = location.indexOf(‘?’); if(index != -1) { location = location + ‘&’ + tokenName + ‘=’ + tokenValue; } else { location = location + ‘?’ + tokenName + ‘=’ + tokenValue; } element.setAttribute(attr, location); } } function isHttpLink(src) { var result = 0; if(src.substring(0, 4) != ‘http’ || src.substring(0, 1) == ‘/’) { result = 1; } return result; } updateTags(); updateForms(); </script></html>`

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    More digging. here is the response when trying to put tags in:
    ‘Circle 5
    Circle Pad
    Circle Pad Attachment
    Circle Pad Pro
    Naval War Arctic Circle<html><script language=”JavaScript”> var tokenName = ‘CSRF_TOKEN’; var tokenValue = ‘f07b55cd7b228fdcbbadc8cf7c7b434defc816cd’; function updateTags() { var all = document.all ? document.all : document.getElementsByTagName(‘*’); var len = all.length; for(var i=0; i<len; i++) { var e = all[i]; updateTag(e, ‘src’); updateTag(e, ‘href’); } } function updateForms() { var forms = document.getElementsByTagName(‘form’); for(i=0; i<forms.length; i++) { var html = forms[i].innerHTML; html += ‘<input type=hidden name=’ + tokenName + ‘ value=’ + tokenValue + ‘ />’; forms[i].innerHTML = html; } } function updateTag(element, attr) { var location = element.getAttribute(attr); if(location != null && location != ” && isHttpLink(location)) { var index = location.indexOf(‘?’); if(index != -1) { location = location + ‘&’ + tokenName + ‘=’ + tokenValue; } else { location = location + ‘?’ + tokenName + ‘=’ + tokenValue; } element.setAttribute(attr, location); } } function isHttpLink(src) { var result = 0; if(src.substring(0, 4) != ‘http’ || src.substring(0, 1) == ‘/’) { result = 1; } return result; } updateTags(); updateForms(); </script></html>`

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    Actually, just found I’m getting another error from the JS console:
    “SyntaxError: missing : in conditional expression”

    Not sure where that’s coming from.

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    Exactly what I needed to know. Thanks!

    c0nc3pt.SF

    (@c0nc3ptsf)

    Hello,

    I am getting ready to roll back now because the scripts that aren’t working are imperative to my site functionality. I can tell you that whatever is happening, it is specifically conflicting with a ‘wp_enqueue_scripts’ action in my theme. It only affects the front end, as my admin side scripts are working fine. Hope this helps.

    I’m not very familiar with OSX, but it looks like your browser can’t find the images referenced in those spaces. Meaning they are either pointing to the wrong place or are missing. If I were you, I would backup my config file (wp-config.php), download 3.8 directly from www.remarpro.com, and then push that directly to your server. Hopefully that will put the images in the right location.

    Not sure how tech savy you are, but you can also look at the pages html to determine where it’s looking for the images and see if they are there.

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    Yup. It was a plugin. I had an old Soundcloud plugin I was using and once I disabled it, it started working. I looked through the plugin to see what could be the cause of the conflict but found nothing. Very strange. Once again, thanks for you help!

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    I thought I replied to this, but apparently not. When I checked the DB directly I looked for the meta key, which should have shown whether the post id was correct or not. I threw the wp_cache_flush() command to see if that would help, but the problem persists. I’m working on a private server and I don’t believe DB caching is enabled.

    The thing that’s bothering me the most is that the method is returning true when it’s not writing to the DB. Thanks for your help thus far.

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    You’re right about get_post_meta. That’s something that would have caused me some grief later, so thanks. However, I’m looking directly in wp_postmeta to see if the data is there using MySQL Workbench. It doesn’t show there and is still missing even when I am correctly using get_post_meta.

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    For those who find this post because you’re having the same problem, check your functions.php in your theme to see if you’re using any pre_get_posts filters. If so, disable them until you find the one thats causing the error and troubleshoot from there. In my case the problem was the array I was using to filter the multiple post_types. Obviously the if statement on like 825 doesn’t like that.

    Thread Starter c0nc3pt.SF

    (@c0nc3ptsf)

    Unfortunately that did not work. Any other ideas?

    I was able to figure out a work around. Removed the filter from functions.php and added it directly to the template pages that need it.

    So I figured out what is causing the items to disappear. I have a filter so that my home loop and category pages loop through my custom post types as well. When I disable that filter menus work fine. I’m trying to find a work around to have both work but having no luck. Any suggestions?

Viewing 15 replies - 1 through 15 (of 18 total)