Subscribe via

WPGB Troubleshooting: Greet Box Doesn’t Show Up

Is it me?
photo credit: id-iom

This post is one of my WP Greet Box Troubleshooting Guides series (more to come).

Symptom

You have installed WP Greet Box and found that your greeting messages do not show up.

Note that this troubleshooting guide should only be used for WP Greet Box with cache compatibility mode enabled.

Step 1: Check code embed

  1. Visit one of your post pages.
  2. Make sure there are no javascript error messages when you visit a post page.
  3. On your post page, do a browser View > Source on the page, then check if the following text are there:
    • wp-greet-box/css/wp-greet-box.css
    • id=”greet_block”
    • wp-greet-box/js/functions.js
    • wp-greet-box/js/onload.js

If all is there, then proceed to next step.

If wp-greet-box/css/wp-greet-box.css does not exists, it could mean that your theme does not make a call to the standard wp_head() function. You can fix this issue by manually inserting the follow between your <head> and </head> tags:

<link rel="stylesheet" href="/wp-content/plugins/wp-greet-box/css/wp-greet-box.css" type="text/css" />

If wp-greet-box/js/functions.js & wp-greet-box/js/onload.js does not exists, it could be that your theme does not make a call to the standard wp_footer() function. You can fix this issue by adding <?php wp_footer(); ?> into your theme’s footer.php or manually inserting the following towards the bottom of your HTML (near the </body> tag):

<script type="text/javascript" src="/wp-content/plugins/wp-greet-box/js/functions.js"></script>
<script type="text/javascript" src="/wp-content/plugins/wp-greet-box/js/onload.js"></script>

If any of these are not there, you might have not installed the plugin properly. Please read the readme.txt file and then retry the installation.

Step 2: Check AJAX call

  1. In WP Greet Box administrative options, make sure the DEFAULT banner is active and set it’s Visitor Timeout to 0.
  2. On the site front-end, visit one of your post pages to see if the Greet Box shows up. If you have navigated to your post page (via any other link on your site, e.g. the homepage) you will need to copy the permalink in your address bar, open a new browser window/tab, paste the permalink into the new browser window/tab, and visit the URL directly.

If you see the default banner using the method above, everything is working fine. You can revert your DEFAULT banner’s Visitor Timeout value to 14400.

If you still do not see the default banner, proceed to the next step.

Step 3: Mimic AJAX call

  1. Use a HTTP request monitoring software such as Firebug with the “NET” console enabled to visit your post page.
  2. Look in the HTTP request log for something that looks like the following URL:
    http://example.com/some/path/index.php?wpgb_public_action=query&visit_delta=14401&referrer=http%3A%2F%2Fsomesite.com%2F
  3. Visit the URL directly to see if you get a greeting message display back (and not a blank page).

If you see the greeting message display back, then there is something else here that is preventing the javascript to retrieve the greeting message. Double check if you have any javascript errors on the post page.

If you do not see the greeting message display back, but see a blank page instead, it is a site specific permalink structure or .htaccess rewrite issue. Proceed to the next step.

Step 4: Find out what works

  1. Try visiting the following URL to see if anything shows up:
    http://example.com/index.php?wpgb_public_action=query&visit_delta=14401&referrer=http%3A%2F%2Fgoogle.com%2F

If a greeting message shows up then something is definitely wrong with URL resolution on your server. Something could be wrong with the .htaccess file, the WordPress adress or Blog address in your WordPress general settings, or the permalink settings. I’m not sure how your site structure is setup, but if you can modify your settings so that WP Greet Box can access an index.php then you should be fine.

If it doesn’t, then you should request support from me by posting a comment on the original plugin page.

24 Responses to “WPGB Troubleshooting: Greet Box Doesn’t Show Up”

[go to last comment]
  1. Reformatus

    I've reinstalled it but it's still not producing the code you have above. What's worse is that this used to work.

  2. Ty Bone

    @Reformatus
    Thanks for reporting. I have updated step 1 to add more information (specifically the part about themes calling wp_footer() / wp_header()). Can you please try those solutions?

  3. Torsten

    Well, on my site, the bar does not show up. I started troubleshooting with your guide and found out, that "id=”greet_block”" is not available in the source code. Where should I put this line manually? Thanks in advance.

  4. Ty Bone

    @Torsten
    Hi There. What version of WordPress are you using? You can try placing &lt;?php wp_greet_box() &gt;> anywhere you like in your theme. Let me know if that works for you.

  5. Torsten

    It's Version 2.7.1.
    After inserting <?php wp_greet_box();> the site cannot be displayed anymore… on FF just a blank site and on IE an error message, that the site cannot be loaded.

  6. just to let you know. i had to insert the script code to the footer, though my theme included a footer.php – well, it's working now. thanks for the plugin, i used the referrer detector plugin before, but it wasn't compatible with my (mootools-powered) theme.

  7. Ty Bone

    @jan
    Thanks for reporting this. Some people have been having this issue and I suspect it has to do with the theme missing a call to wp_footer() at the end. What WordPress version and theme are you using?

  8. i'm using wpmu 2.7 with a customized version of Infimum by Alex Smith

  9. tomorrow i will use the theme in a regular wordpress and try wpmu with another theme.. will let you know about the outcome!

  10. Ty Bone

    Strange… wp_footer() is inside footer.php. I wonder if it's a WPMU bug.

  11. it's all working, the footer did not include <?php wp_footer(); ?>

    thanks for the help, sorry for the false alarm 🙂

  12. Thank you so much Jan!

  13. Ty Bone

    Oh! Great! Glad that it's not my code. Thank you for reporting back.

  14. Salem

    I've done your tutorial as mentioned. Everything is PRESENT, but firebug does NOT turn out any http requests for that URL you mentioned in step 3. It does return 2 errors:
    "B.childNodes is undefined"
    and

    "[Exception… "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://technoheads.org/wp-includes/js/jquery/jque… :: anonymous :: line 11" data: no]
    http://technoheads.org/wp-includes/js/jquery/jque…
    Line 11"

    I'm fairly certain that jquery.js isn't needed for wpgb (seeing as it wasn't mentioned above), but does this help at all? I hate to be persistant like this, and I appreciate your help previously.

  15. Ty Bone

    jQuery is needed for WP Greet Box to work :). It is responsible for making the AJAX request in step 3. You will have to resolve the jQuery exception to get this to work.

  16. salem

    Do you have any idea how I should go about fixing this? if not, I'll just stumble around google for a bit.

  17. Ty Bone

    Nope, sorry 🙁

  18. Boo Radley

    Thanks for the awesome mod.
    I am using a version of Linux server that does not allow direct htaccess.

    Can you please let me know what I should be adding to the htaccess file so that I can manually add it?

    Thanks 🙂

  19. Ty Bone

    For WP Greet Box to not show up from the direct URL all, it means that there is funky with the server setup. I'm not a htaccess wizard myself so I wouldn't immediately know if you show me your .htaccess file. You might be better off asking someone who's really good with .htaccess file to help you troubleshoot your server setup.

    Also, if step 4 works for you, you might want to try changing:
    url: "index.php"
    to
    url: "/index.php"
    in wp-gree-box/js/onload.js, to see if it helps.

  20. Ty Bone

    For WP Greet Box to not show up from the direct URL all, it means that there is funky with the server setup. I'm not a htaccess wizard myself so I wouldn't immediately know if you show me your .htaccess file. You might be better off asking someone who's really good with .htaccess file to help you troubleshoot your server setup.

    Also, if step 4 works for you, you might want to try changing:
    url: "index.php"
    to
    url: "/index.php"
    in wp-greet-box/js/onload.js, to see if it helps.

  21. Rad

    Hello!

    Your plugin is great!
    Please note that the default phrasing uses the word "Also" without a comma after it.
    http://www.englishrules.com/writing/2005/comma-wi…

  22. Ty

    Thanks Rad. I will fix the default phrasing in the next release.

  23. Zuhaib

    my wp installation is new .. I installed the plugin .. it doesn't work .. step 3-4 work fine .. bt still I dont get teh greetbox .. wht m I doing wrong?

    http://www.zuhaib.in/

  24. Ty Bone

    Lock up this comment thread so people can post support questions in the support forum.

[go to first comment]

Leave a Reply