• shammah

    (@shammah)


    Recently started using this theme. Was working fine. Today I just got this error message pop up when I tried to log out:

    Parse error: syntax error, unexpected ‘<‘ in /home/sham8551/public_html/w

    p-content/themes/flat-bootstrap/404.php on line 12″

    What do I do. Please, when responding, keep in mind that I am not tech savvy. I did however find out where this error message pointed to, but now what?

    Thanks.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Can you kindly post the content of your /home/sham8551/public_html/w
    p-content/themes/flat-bootstrap/404.php file.

    Within code tag.

    Thread Starter shammah

    (@shammah)

    Parse error: syntax error, unexpected ‘<‘ in /home/sham8551/public_html/wp-content/themes/flat-bootstrap/404.php on line 12

    Thanks for response. The above is exactly what spit out (popped up) when I tried to log out. The theme was working fine since installing it about 5 days ago or so.

    I do not know what it is you are asking of me – what is the “tag code” and are you asking me to go onto my site and do this ….

    Did warn you I am technically challenged.

    Thanks Grey Parrrots

    Kindly post the content of that file.

    Thread Starter shammah

    (@shammah)

    Is this what you are looking for; the entire css for that page.

    <?php
    /**
    * Theme: Flat Bootstrap
    *
    * The template for displaying 404 pages (Not Found).
    *
    * @package bootstrap-flat
    */

    <meta name=”p:domain_verify” content=”547e9ea4e9a1acdac2ba21e8c7fa1242″/>

    get_header(); ?>

    <?php /* Display the header full-width to match our theme */ ?>
    <header class=”content-header”>
    <div class=”container”>
    <section class=”error-404 not-found”>
    <h1 class=”page-title”><?php _e( ‘Oops! That page can’t be found.’, ‘bootstrap-flat’ ); ?></h1>
    <h3 class=”page-description”><?php _e( ‘Or as techies would say, its a “404 Error”‘, ‘bootstrap-flat’ ); ?></h3>
    </section><!– .error-404 –>
    </div><!– .container –>
    </header>

    <?php /* Now display the main page and sidebar */ ?>
    <div class=”container”>
    <div id=”main-grid” class=”row”>

    <div id=”primary” class=”content-area col-md-8″>
    <main id=”main” class=”site-main” role=”main”>

    <p><?php _e( ‘It looks like nothing was found at this location. Maybe try one of the links below or a search?’, ‘bootstrap-flat’ ); ?></p>

    <?php get_template_part( ‘content’, ‘siteindex’ ); ?>

    </main><!– #main –>
    </div><!– #primary –>

    <?php get_sidebar(); ?>

    </div><!– .row –>
    </div><!– .container –>

    <?php get_footer(); ?>

    Kindly delete this line and save it

    <meta name=”p:domain_verify” content=”547e9ea4e9a1acdac2ba21e8c7fa1242″/>

    Thread Starter shammah

    (@shammah)

    I did as you asked and logged out — and got:

    Oops! That page can’t be found.
    Or as techies would say, its a “404 Error”

    It looks like nothing was found at this location. Maybe try one of the links below or a search?

    I clicked on another link and it brought up one of my pages. I went to log out from that page and got the same error message as immediately above.

    Thread Starter shammah

    (@shammah)

    I would appreciate it if someone could tell me how to fix this error. The latest report refers to Line 10. I figured your initial instructions to take out that line of code weren’t the solution (in fact it wasn’t) so I added it back in.

    I am concerned about there being access to my web site by hackers.

    Should I be contacting the theme designer for a solution?

    The error is not visible unless you are logged in and try to log out. That is when the 404 error message comes up. Am providing my website url, in any event.

    https://shammahspace.ca

    Tim Nicholson

    (@timnicholson)

    Hi, I’m the theme author, but hadn’t seen this previously as its not posted in the support forum for the theme (https://www.ads-software.com/support/theme/flat-bootstrap). No worries, I’m happy to try to help. It appears that you have modified the 404.php and added this line before the header is displayed.
    <meta name="p:domain_verify" content="547e9ea4e9a1acdac2ba21e8c7fa1242"/>

    You can’t add meta tags before the header is processed. So the response above about deleting that line is valid. In fact, if you are still getting that error you should re-download the theme and copy the original 404.php over the one you modified. That should fix the issue with the 404 page.

    Now, working backwards, if you are getting the 404 page when logging out, something must be mangling your logout URL itself. Perhaps a plugin or a modification that you made? I tried to register with your site to see what’s going on, but you have registration disabled. BTW, it actually let me click on “Log in with WordPress.com” but then redirected me to a mangled URL which in turn triggers the 404 page. So something is definitely wrong with the register, login, logout features of your site.

    BTW, your site looks nice. I think the theme looks good with your content.

    Also, when we get your issues fixed, do you mind updating your review of the theme? Its a new theme and the first review so its set the overall rating to a 2.

    Thread Starter shammah

    (@shammah)

    Hi Tim.

    I hadn’t manually done any modifications. The meta code just appeared. I’ve removed it once again.

    Question I have is, if I reinstall a fresh version – will it eliminate all of the changes I have done? Seems to me it would.

    (1) Yesterday, before this error came up, I had installed Yoast WordPress SEO and did some modifications. I just restored it. Still the same 404 error when I go to log out.

    (2) Options Framework: This was installed yesterday. Do I need it? Could it be what is causing the error messages? I deactivated it and still getting the 404 msg.

    (3) I had previously installed Register Plus Deluxe when first using this theme, thinking at the time I wanted to allow people to register (possibly contribute to the site). However…I got a plethora of registrations from some weird …. places …. and so I removed this option. My key point in this was I simply wanted to allow people the option to make a comment. They can do this with their social media log ins and all comments are moderated. I just now DEACTIVATED this plug in – and still the same error message.

    I can add you — to permit access — if you wish and think this would help. I am trying to avoid having to reformat the site….

    Let me know, and thanks.

    Velma

    Tim Nicholson

    (@timnicholson)

    Yes, if you reinstall the theme directly from the WordPress directory, it will overwrite your changes. The next version of the theme will include a child theme in it, which is what you should use to avoid that issue. Here’s more about child themes: https://codex.www.ads-software.com/Child_Themes

    You really should set up a child theme and have your modifications in it. That way, you can upgrade the main theme without losing your changes. Also, when you have an error like you are having now you can change your theme back to the main theme to see if the error still exists. So it will help with troubleshooting.

    For now, you can save off the 404.php file from the theme and delete it or rename it. That way the default 404 page from WordPress will be displayed. That might cause the error to go away.

    But your real issue is that whatever plugin or code that you have for login and logout is generating a bad URL that is causing the 404 page to be displayed. Try looking at the log in and log out URL’s. They should look something like this:

    Logout: https://xtremelysocial.com/test/wp-login.php?action=logout&_wpnonce=950bc72aa8

    Login: https://xtremelysocial.com/test/wp-login.php

    If they don’t, that’s the issue.

    Tim Nicholson

    (@timnicholson)

    BTW, since you are in a bind, if you want to use a child theme, you can download mine here. Its the version that’s going to be in the next release of the theme. https://github.com/xtremelysocial/flat-bootstrap-child

    Tim Nicholson

    (@timnicholson)

    Ah, and that meta tag must be from the Yoast plugin or some other plugin that is trying to prove to Google Analytics that you own your site. You can validate Google Analytics by editing your DNS from Godaddy or wherever you bought your domain name from instead of using a meta tag. But for now, try turning off anything related to Google Analytics.

    Tim Nicholson

    (@timnicholson)

    Sorry, meant go here to download the child theme: https://github.com/xtremelysocial/flat-bootstrap-child

    Thread Starter shammah

    (@shammah)

    I really appreciate your time Tim. I did download it earlier and installed it — and, guess what? Still getting the error message:

    Oops! That page can’t be found.
    Or as techies would say, its a “404 Error”

    It looks like nothing was found at this location. Maybe try one of the links below or a search?

    and the url that shows up with that message is:

    https://shammahspace.ca/logout-sce-shammahcreativeservices/?_wpnonce=919f2ef5d1

    I have no idea where the “logout-sce-shammahcreativesservices ….” comes from!

    I am a wee bit frustrated — but like I said I do appreciate your help. I like you theme, but if this continues (having spent a day or so trying to figure out what I did wrong), especially where I installed the new theme template — may have to consider another theme.

    Tim Nicholson

    (@timnicholson)

    That logout URL definitely looks like its being manipulated by a plugin. Either an active plugin that is dynamically changing it from the standard logout.php URL or a previously active plugin that maybe added a redirect to your .htaccess file. Check .htaccess file for a redirect that has “sce” in it.

    Also, I’d disable *all* plugins temporarily and see if the normal logout.php URL is being used and works. Then re-active one plug in at a time testing your login / logout until it stops working again. Then you’ll know which plugin is causing the issue.

    I’d like to see you continue to use the theme. I can assure you that this theme is not manipulating your logout URL. You’ll have the same problem with any theme. In fact, you may want to activate the TwentyFourteen theme for a few minutes on your site to try to login and logout and then set it back to the Flat Bootstrap theme.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Flat-Bootstraph Theme – Parse-Syntax 404 error line 12’ is closed to new replies.