WordPress.org

Ready to get started?Download WordPress

Forums

Can't login in admin: Parse error: syntax error, unexpected T_STRING (24 posts)

  1. vincentleleux
    Member
    Posted 1 year ago #

    Hello,
    I get an error when I try to login to one of my websites
    (the website is accessible though):

    Parse error: syntax error, unexpected T_STRING ...

    First it was in a file in a plugin, so via FTP I changed the name of the plugin folder to deactivate it,
    then it was with another plugin, so I changed the names of the plugins folder altogether,

    it then made the same error with my theme,
    I then changed the name of my theme folder,
    then the page is totally blank

    I restored the database from 10 days ago: still the same
    I uploaded the latest version of wordpress : still the same

    Could you help me?
    I have no idea what was done to the website to make these errors...

    Thanks for your help
    Vincent

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Site url?

  3. healthable
    Member
    Posted 1 year ago #

    Are you sure it's not a plugin problem

  4. vincentleleux
    Member
    Posted 1 year ago #

    The url is http://healingcreativity.com/
    the site itself works properly, it's only the admin that bugs...

    I changed the name of the plugins folder, it seems to me it would deactivate all plugins...

    but then as I said it makes the same error with the themes:

    Parse error: syntax error, unexpected T_STRING in /home4/julietjc/public_html/healingcreativity.com/wp-content/themes/HealingCreativityChildTheme/lib/admin/theme-settings.php on line 457

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    The issue is definitely in your theme. Were did you download it from?

  6. vincentleleux
    Member
    Posted 1 year ago #

    I made a child theme from a child theme of genesis.

    It has been working perfectly for such a long time.

    Only modified the sidebar width before this error appeared

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    What happens when you use the parent theme?

  8. vincentleleux
    Member
    Posted 1 year ago #

    I tried to deactivate the child theme, but the page is then blank

  9. esmi
    Forum Moderator
    Posted 1 year ago #

    Are you activating the parent theme? Or the default Twenty Twelve theme?

  10. vincentleleux
    Member
    Posted 1 year ago #

    How can I activate the theme of my choice since I cannot access the admin, I guess I can do it in phpmyadmin, but some guidance would be appreaciated

  11. esmi
    Forum Moderator
    Posted 1 year ago #

    Try switching to the default theme by renaming your current theme's folder inside wp-content/themes and adding "-old" to the end of the folder name using FTP or whatever file management application your host provides.

  12. vincentleleux
    Member
    Posted 1 year ago #

    I have done that already, and the page is then totally blank

  13. esmi
    Forum Moderator
    Posted 1 year ago #

    Re-upload a fresh, unpacked, copy of the Twenty Twelve folder to wp-content/themes using FTP or whatever file management application your host provides.
    http://wordpress.org/extend/themes/twentytwelve

  14. vincentleleux
    Member
    Posted 1 year ago #

    I did re-uploaded TwentyTwelve but it doesn't get better at all.

  15. pdobariya
    Member
    Posted 1 year ago #

    hi vincentleleux your wp-admin is redirecting to this url http://healingcreativity.com/healingcreativity.com/wp-admin/ after going to healingcreativity.com/wp-admin. it may be problem in siteurl or homeurl

  16. pdobariya
    Member
    Posted 1 year ago #

    make sure your siteurl and homeurl is correct.

  17. vincentleleux
    Member
    Posted 1 year ago #

    thank you, these urls are absolutely correct.

  18. pdobariya
    Member
    Posted 1 year ago #

    give me your siteurl and homeurl values that you have changed. because both should be in http://healingcreativity.com format

  19. vincentleleux
    Member
    Posted 1 year ago #

    the issue is not there, it has been working for years that way... the website is in a subfolder named healingcreativity.com . so that works.

    tell me what could cause any issue with that?

  20. pdobariya
    Member
    Posted 1 year ago #

    ok so http://healingcreativity.com/healingcreativity.com/ is your front end is it? can you change sub folder name to healingcreativity only, And open /home4/julietjc/public_html/healingcreativity.com/wp-content/themes/HealingCreativityChildTheme/lib/admin/theme-settings.php file and see any syntax is missing or IF ELSE condition is properly ended or not.

  21. vincentleleux
    Member
    Posted 1 year ago #

    No it's not my front end. http://healingcreativity.com is

    I cannot change the name of the folder as I can't access the admin to reflect that change.

    below is the function the error is referring to - line 457 is the second one : $page_id = 'genesis';

    I don't know anything to php so I don't know what it means.

    Thank you for your help

    function __construct() {
    
    		$page_id = 'genesis';
    
    		$menu_ops = apply_filters(
    			'genesis_theme_settings_menu_ops',
    			array(
    				'main_menu' => array(
    					'sep' => array(
    						'sep_position'   => '58.995',
    						'sep_capability' => 'edit_theme_options',
    					),
    					'page_title' => 'Theme Settings',
    					'menu_title' => 'Genesis',
    					'capability' => 'edit_theme_options',
    					'icon_url'   => PARENT_URL . '/images/favicon.png',
    					'position'   => '58.996',
    				),
    				'first_submenu' => array( /** Do not use without 'main_menu' */
    					'page_title' => __( 'Theme Settings', 'genesis' ),
    					'menu_title' => __( 'Theme Settings', 'genesis' ),
    					'capability' => 'edit_theme_options',
    				),
    			)
    		);

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  22. pdobariya
    Member
    Posted 1 year ago #

    this is function __construct() {} , Have you paste complete code of __construct() function here, because end of the function " } " is not showing here. thanks

  23. vincentleleux
    Member
    Posted 1 year ago #

    This is the complete function :

    function __construct() {
    
    		$page_id = 'genesis';
    
    		$menu_ops = apply_filters(
    			'genesis_theme_settings_menu_ops',
    			array(
    				'main_menu' => array(
    					'sep' => array(
    						'sep_position'   => '58.995',
    						'sep_capability' => 'edit_theme_options',
    					),
    					'page_title' => 'Theme Settings',
    					'menu_title' => 'Genesis',
    					'capability' => 'edit_theme_options',
    					'icon_url'   => PARENT_URL . '/images/favicon.png',
    					'position'   => '58.996',
    				),
    				'first_submenu' => array( /** Do not use without 'main_menu' */
    					'page_title' => __( 'Theme Settings', 'genesis' ),
    					'menu_title' => __( 'Theme Settings', 'genesis' ),
    					'capability' => 'edit_theme_options',
    				),
    			)
    		);
    
    		$page_ops = apply_filters(
    			'genesis_theme_settings_page_ops',
    			array(
    				'screen_icon'       => 'options-general',
    				'save_button_text'  => __( 'Save Settings', 'genesis' ),
    				'reset_button_text' => __( 'Reset Settings', 'genesis' ),
    				'saved_notice_text' => __( 'Settings saved.', 'genesis' ),
    				'reset_notice_text' => __( 'Settings reset.', 'genesis' ),
    				'error_notice_text' => __( 'Error saving settings.', 'genesis' ),
    			)
    		);
    
    		$settings_field = GENESIS_SETTINGS_FIELD;
    
    		$default_settings = apply_filters(
    			'genesis_theme_settings_defaults',
    			array(
    				'update'                    => 1,
    				'blog_title'                => 'text',
    				'header_right'              => 0,
    				'site_layout'               => genesis_get_default_layout(),
    				'nav'                       => 1,
    				'nav_superfish'             => 1,
    				'nav_extras_enable'         => 0,
    				'nav_extras'                => 'date',
    				'nav_extras_twitter_id'     => '',
    				'nav_extras_twitter_text'   => __( 'Follow me on Twitter', 'genesis' ),
    				'subnav'                    => 0,
    				'subnav_superfish'          => 1,
    				'feed_uri'                  => '',
    				'comments_feed_uri'         => '',
    				'redirect_feeds'            => 0,
    				'comments_pages'            => 0,
    				'comments_posts'            => 1,
    				'trackbacks_pages'          => 0,
    				'trackbacks_posts'          => 1,
    				'breadcrumb_home'           => 0,
    				'breadcrumb_front_page'     => 0,
    				'breadcrumb_posts_page'     => 0,
    				'breadcrumb_single'         => 0,
    				'breadcrumb_page'           => 0,
    				'breadcrumb_archive'        => 0,
    				'breadcrumb_404'            => 0,
    				'breadcrumb_attachment'		=> 0,
    				'content_archive'           => 'full',
    				'content_archive_thumbnail' => 0,
    				'posts_nav'                 => 'older-newer',
    				'blog_cat'                  => '',
    				'blog_cat_exclude'          => '',
    				'blog_cat_num'              => 10,
    				'header_scripts'            => '',
    				'footer_scripts'            => '',
    				'theme_version'             => PARENT_THEME_VERSION,
    				'db_version'                => PARENT_DB_VERSION,
    			)
    		);
    
    		$this->create( $page_id, $menu_ops, $page_ops, $settings_field, $default_settings );
    
    		add_action( 'genesis_settings_sanitizer_init', array( $this, 'sanitizer_filters' ) );
    
    	}
  24. vincentleleux
    Member
    Posted 1 year ago #

    I have changed the theme via PhpMyadmin and now it is making another error:

    Parse error: syntax error, unexpected T_PRIVATE in /home4/julietjc/public_html/healingcreativity.com/wp-admin/custom-header.php on line 506

    What could I do ?

Topic Closed

This topic has been closed to new replies.

About this Topic