Support » Plugin: WP Datepicker » php Problem

  • Resolved bbhank

    (@bbhank)


    Tested all kinds of ways – With no plugins at all except Shortcode Creator because that’s what’s carrying the php, with only minimum plugins. Tried various plugins without success. Tried with just code on page. This will only work if there is no php running on the page. Plugin works but php will not run on WordPress page.

    Was working for years, then in May something happened. I hadn’t changed anything on the site at all and there were no viruses or malware.

    Here’s the code I’m using. Its part of a table.
    <TR><TD style=”width: 50%; background-color:#caffbd;”><center>Start Date:<br><input type=”text” name=”startdate” id=”datepicker” maxlength=”10″ required/></center></TD><TD style=”width:100px; background-color:#caffbd;”><center>End Date:<br><input type=”text” name=”enddate” id=”datepicker2″ maxlength=”10″ required/></center></TD></TR>

    Any ideas?

    Also, instructions hard to understand. Need better explanations for non-programmers and newbies.

    Tnx.

    • This topic was modified 2 years, 8 months ago by bbhank.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    I have just checked your implementation, couldn’t find any JavaScript in your sourcecode. Maybe your are not using wp_footer? Make sure that your page is having proper WordPress footer.php with get_footer(); etc. inside it. In fact, this plugin use some scripts which make your text fields a datepicker field. I don’t see any script just before ending your body tag regarding this plugin. I am available for help but can you please check once again if your theme is having correct footer.php implementation?

    Tip:
    Just check the EOF (source code), you will notice that your form is ending and no body or html closing tags. So i doubt, you are breaking somewhere with some exit? Or maybe some errors.

    Thread Starter bbhank

    (@bbhank)

    From footer.php –

    do_action( ‘__before_footer’ ); ?>
    <!– FOOTER –>
    <footer id=”footer” class=”<?php echo czr_fn__f(‘tc_footer_classes’, ”) ?>”>
    <?php do_action( ‘__footer’ ); // hook of footer widget and colophon?>
    </footer>
    </div><!– //#tc-page-wrapper –>
    <?php
    do_action( ‘__after_page_wrap’ );
    wp_footer(); //do not remove, used by the theme and many plugins
    do_action( ‘__after_footer’ ); ?>
    </body>
    <?php do_action( ‘__after_body’ ); ?>
    </html>

    Thread Starter bbhank

    (@bbhank)

    As for the “implementation”, not sure of what you mean by that, but no, there is no javascript anywhere in the code. The datepicker always worked as it was. There are no html tags in the actual script. I tried that with and without and it had no effect.

    Your tip is not clear. This is where more succinct description is needed. Not everybody is a programmer, nor do we want to be.

    Please expand your instructions and explanations to where us non-programmers can understand them. It is not clear how to put the datepicker on the page and how to set it up. It shows 3 methods but only one, the html, makes any sense, and how to use it is not explained. The video is of no help.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    I have recorded another fresh video for you. I hope, it will help you to understand the problem

    https://youtu.be/FS95lZn4IRE

    Here is a demo URL
    http://demo.androidbubble.com/wp-datepicker/

    Thread Starter bbhank

    (@bbhank)

    I have the same theme as ever. This is the same code as ever. Nothing changed on my end. That’s the frustrating part. I didn’t write the theme. The last part of May a lot of things stopped working on my site. I hadn’t even been on the site. There were no virus or malware. Everything has had to be rebuilt. This is the last piece that doesn’t work and you say there is no error in my code but in the page itself. Thank you for the time and video but the stuff you are talking about on the page, in the theme, is not something I built, or can edit. All I can do is try another theme but that wrecks everything else.

    Thread Starter bbhank

    (@bbhank)

    Thank you.

    Now at least I know where the error is.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    You are right, changing the theme will help you to make sure if it’s related to this theme else some plugin is halting the process.

    Thread Starter bbhank

    (@bbhank)

    Eliminated the theme as a possible culprit.
    THEN:
    Took apart the whole page. Reassembled it piece by piece, php code block by php code block.
    Problem was not where I thought it would be, but I didn’t know.

    Took out this code:
    “//select which database you want to edit
    mysql_select_db(“database”)or die( “<p><span style=\”color: red;\”>Unable to select database</span></p>”);”

    Realized database already selected. Tested and It now works!

    Thank you much.
    Out of 5 possible stars you must get at least 8 for this kind of help.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Thank you my friend.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘php Problem’ is closed to new replies.