Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Help with code

  • 04-01-2015 07:04PM
    #1
    Registered Users, Registered Users 2 Posts: 1,399 ✭✭✭


    Hoping someone might be able to help with an issue I'm having. I'm using a wordpress theme which is throwing up the following error when trying to load the site:

    Fatal error: Class 'VA_Listing_Info_Edit' not found in /..../public_html/wp-content/themes/vantage/includes/listing-form.php on line 13

    This class is contained in the attached file and I can't seem to see the error. The theme support has expired so I can't get help there. Thanks in advance if anyone takes a look.


Comments

  • Registered Users, Registered Users 2 Posts: 7,206 ✭✭✭Talisman


    I just had a quick look and there appears to be two declarations of the VA_Listing_Info_Purchase class. See Line 16 and Line 133.

    The first declaration appears to be rogue code.
    [COLOR="Red"][B]class VA_Listing_Info_Purchase extends VA_Listing_Info_Edit{
    
    	public function __construct(){
    		$this->setup( 'edit-listing', array(
    			'priority' => 2,
    			'register_to' => array( 'create-listing' => array( 'after' => 'purchase-listing' ) ),
    	        ));
    	}[/B][/COLOR]class VA_Listing_Info_Edit extends VA_Checkout_Step{
    
    Try removing the code highlighted above from Line 16 and you may end up with some valid PHP code.


  • Registered Users, Registered Users 2 Posts: 1,399 ✭✭✭sozbox


    Hey, thanks for having a look that for me. I removed those lines and replaced the file, cleared cache etc but I am still getting the same error as before.


  • Registered Users, Registered Users 2 Posts: 7,206 ✭✭✭Talisman


    Any chance you could zip up the theme file and PM me the link so I can look at all of the code?

    The PHP class VA_Listing_Info_Edit extends another class VA_Checkout_Step which isn't in that file.


  • Registered Users, Registered Users 2 Posts: 7,206 ✭✭✭Talisman


    The issue is to do with the loading of the VA_Checkout_Step class. Your version of the theme is quite old and presumably the developers fixed the class auto loading issue in a later release.

    Move lines 13 & 14 to the end of the file and it should fix the issue.
    new VA_Listing_Info_Edit;
    new VA_Listing_Info_Purchase;
    


  • Registered Users, Registered Users 2 Posts: 1,399 ✭✭✭sozbox


    Thank you so much, that worked!


  • Advertisement
Advertisement