Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #245800

    Hi,

    We just moved our website to a new hosting service. When we did it, the Enfold features for the Advanced Layerslider seem to have disappeared. It now says “no layerslider found click here to create one”.

    Any idea how to get the old ones back?

    Thanks ahead of time,
    DBD

    #245823

    Hey dbddiamonds!

    How did you move the database? Did you migrate it and re-serialized the data or just an export/import? If the migration wasn’t done correctly the data could be incorrect in the database in which case it would need to be fixed there.

    Cheers!
    Devin

    #255900

    We moved it to a new hosting site. I’m a little fuzzy on it. But anyways, I don’t know what “incorrect in the database” means or how to fix it. I found a file in the enfold download “sample sliders” copied it, and put it into the import slider part of the layerslider. Then I saved it, but no new sliders were provided – I think that my advanced slider feature is totally unresponsive. I have made new layers, with new slides, and saved and saved again, only to have them disappear. I am not sure if this is supposed to be this un-user friendly, or if I’m just the one guy stuck with the glitch.

    Thanks,
    DBD

    #256784

    It sounds like the data in your database on the new server is incorrect/corrupted. Unfortunately there isn’t a fix that we can do or suggest in this case. The typical way of moving should be to use something like the plugin mentioned here http://kriesi.at/documentation/enfold/move-from-a-local-installation-to-a-live-server/

    Your options are pretty limited but you could have a freelance developer attempt to fix your WordPress tables for the theme options and LayerSlider options, clear them out or do a full re-install of WordPress and re-export the old site data and then import it in.

    #258562

    Could you check my code? Could the problem be there? config-layerslider/config.php

    <?php

    if(!function_exists(‘avia_find_layersliders’))
    {
    function avia_find_layersliders($names_only = false)
    {
    // Get WPDB Object
    global $wpdb;

    // Table name
    $table_name = $wpdb->prefix . “layerslider”;

    // Get sliders
    $sliders = $wpdb->get_results( “SELECT * FROM $table_name WHERE flag_hidden = ‘0’ AND flag_deleted = ‘0’ ORDER BY date_c ASC LIMIT 100” );

    if(empty($sliders)) return;

    if($names_only)
    {
    $new = array();
    foreach($sliders as $key => $item)
    {
    if(empty($item->name)) $item->name = __(“(Unnamed Slider)”,”avia_framework”);
    $new[$item->name] = $item->id;
    }

    return $new;
    }

    return $sliders;
    }
    }

    /********************************************************/
    /* Action to import sample slider – modified version */
    /********************************************************/

    if(!function_exists(‘avia_remove_default_import’))
    {
    add_action(‘admin_menu’, ‘avia_remove_default_import’,1);

    function avia_remove_default_import()
    {
    if(isset($_GET[‘page’]) && $_GET[‘page’] == ‘layerslider’ && isset($_GET[‘action’]) && $_GET[‘action’] == ‘import_sample’)
    {
    remove_action( ‘admin_init’ , ‘layerslider_import_sample_slider’);
    add_action( ‘admin_init’ , ‘avia_import_sample_slider’);
    }
    }
    }

    if(!function_exists(‘avia_import_sample_slider’))
    {
    function avia_import_sample_slider() {

    // Base64 encoded, serialized slider export code
    $path = “avia-samples/”;
    $sample_file = “sample_sliders.txt”;
    $sample_slider = json_decode(base64_decode(file_get_contents(dirname(__FILE__).”/LayerSlider/{$path}{$sample_file}”)), true);

    //echo”

    ";
    		//print_r(base64_encode(str_replace('avia-samples','sampleslider', base64_decode(file_get_contents(dirname(__FILE__).'/LayerSlider/sampleslider/sample_sliders2.txt'))))) ;
    		//echo"
    ";
    		//die();
    		
    
    		// Iterate over the sliders
    		foreach($sample_slider as $sliderkey => $slider) {
    	
    			// Iterate over the layers
    			foreach($sample_slider[$sliderkey]['layers'] as $layerkey => $layer) {
    	
    				// Change background images if any
    				if(!empty($sample_slider[$sliderkey]['layers'][$layerkey]['properties']['background'])) {
    					$sample_slider[$sliderkey]['layers'][$layerkey]['properties']['background'] = $GLOBALS['lsPluginPath'].$path.basename($layer['properties']['background']);
    				}
    	
    				// Change thumbnail images if any
    				if(!empty($sample_slider[$sliderkey]['layers'][$layerkey]['properties']['thumbnail'])) {
    					$sample_slider[$sliderkey]['layers'][$layerkey]['properties']['thumbnail'] = $GLOBALS['lsPluginPath'].$path.basename($layer['properties']['thumbnail']);
    				}
    	
    				// Iterate over the sublayers
    				if(isset($layer['sublayers']) && !empty($layer['sublayers'])) {
    					foreach($layer['sublayers'] as $sublayerkey => $sublayer) {
    		
    						// Only IMG sublayers
    						if($sublayer['type'] == 'img') {
    							$sample_slider[$sliderkey]['layers'][$layerkey]['sublayers'][$sublayerkey]['image'] = $GLOBALS['lsPluginPath'].$path.basename($sublayer['image']);
    						}
    					}
    				}
    			}
    		}
    	
    		// Get WPDB Object
    		global $wpdb;
    	
    		// Table name
    		$table_name = $wpdb->prefix . "layerslider";
    	
    		// Append duplicate
    		foreach($sample_slider as $key => $val) {
    	
    			// Insert the duplicate
    			$wpdb->query(
    				$wpdb->prepare("INSERT INTO $table_name
    									(name, data, date_c, date_m)
    								VALUES (%s, %s, %d, %d)",
    								$val['properties']['title'],
    								json_encode($val),
    								time(),
    								time()
    				)
    			);
    		}
    	
    	}
    }
    
    
    
    
    
    
    
    /**************************/
    /* Include LayerSlider WP */
    /**************************/
    if(is_admin())
    {	
    	add_action('init', 'avia_include_layerslider' , 45 );
    }
    else
    {	
    	add_action('wp', 'avia_include_layerslider' , 45 );
    }
    
    function avia_include_layerslider()
    {	
    	if(!is_admin() && !post_has_layerslider()) return;
    	
    	// Path for LayerSlider WP main PHP file
    	$layerslider = get_template_directory() . '/config-layerslider/LayerSlider/layerslider.php';
    	$themeNice	 = avia_backend_safe_string(THEMENAME);
    
    	// Check if the file is available and the user didnt activate the layerslide plugin to prevent warnings
    	if(file_exists($layerslider)) 
    	{
    		if(function_exists('layerslider')) //layerslider plugin is active
    		{
    			if(get_option("{$themeNice}_layerslider_activated", '0') == '0') 
    			{
    		        //import sample sliders
    		 		avia_import_sample_slider();
    		 		
    		        // Save a flag that it is activated, so this won't run again
    		        update_option("{$themeNice}_layerslider_activated", '1');
    		    }
    		}
    		else //not active, use theme version instead
    		{
    		    // Include the file
    		    include $layerslider;
    		    
    		    $GLOBALS['lsPluginPath'] 	= get_template_directory_uri() . '/config-layerslider/LayerSlider/';
    		    $GLOBALS['lsAutoUpdateBox'] = false;
    		 
    		    // Activate the plugin if necessary
    		    if(get_option("{$themeNice}_layerslider_activated", '0') == '0') {
    		 
    		        // Run activation script
    		        layerslider_activation_scripts();
    		        
    		        //import sample sliders
    		 		avia_import_sample_slider();
    		 		
    		        // Save a flag that it is activated, so this won't run again
    		        update_option("{$themeNice}_layerslider_activated", '1');
    		    }
    	    }
    	}
    }
    
    
    #258825

    Hey!

    I’m sorry but the problem is not with the code but how you migrated or transferred the website. In order to migrate the theme successfully and leave the database intact including the layer slider data, please use this plugin: WP MigrateDB or WP MigrateDB PRO

    Refer to this link for more info on how to properly migrate your website from production to development vice versa: https://code.tutsplus.com/tutorials/migrating-your-wordpress-database-wp-migrate-db-production-to-development–wp-32684

    Cheers!
    Ismael

    #259504

    Well, I’ve already migrated the website, so it’s too late for that. Are you saying now that it’s too late to fix it, or it’s just completely broken now, and there’es nothing I can do?

    What can I do that will FOR SURE fix the layerslider and not do any more damage to the website.

    Best,
    DBD

    #259689

    Hi!

    I’m sorry but technically there is nothing to fix on the layer slider. The data is lost when you transferred the website. Please contact your host then ask them if they can revert the changes or if they can restore to a backup. Once the website is restored, transfer or migrate the website using the suggested plugin above.

    Best regards,
    Ismael

    #260467

    Sorry, but what “data” is lost? If it isn’t in the code- where is it? What are you so sure is gone?

    Best,
    DBD

    #260558

    Hi!

    The data for the layerslider which is located on the database. If the database is not properly transferred with the help of the plugins that we suggested above, the slider data will be lost. I’m so sorry about this but I think we won’t be able to help you unless you tell your hosting provider to restore the website.

    Regards,
    Ismael

    #261544

    Is there a plugin or something that can replace the advanced slider’s usability? Ways to do the same thing without an advance slider?

    PS: How do you guys build the advanced slider? It’s code I imagine, or a file you place in the database. Why can’t you just give me the necessary files to put in the database?

    Best,
    DBD

    #262148

    Hey!

    You can re-create the slideshows as needed but no we don’t have any file or anything like that we can provide. The demo data import is a single batch import of the whole demo data. There isn’t single exported version of only the LayerSlider slideshows alone.

    I just remembered that with the newest version of LayerSlider you can import the sample sliders from within the plugin by clicking on the Import Sample Sliders button next to the Add New button. If you import all demo sliders it will re-create the two Enfold slideshows.

    Cheers!
    Devin

    • This reply was modified 9 years, 10 months ago by Devin.
    #262575

    I have tried to import the demo sliders. When I click import, the Enfold slideshows don’t show up. Let me make sure that I am doing it right. Where do I find the demo sliders to import?

    What I did was I went to the enfold folder, found the sample slider text document and copied all the gibberish that was there. I pasted it into the import sliders input, but like I said, nothing happened.

    #262688

    Hi!

    Thank you for the update.

    You can try to create a dummy site with the Enfold theme then go to Enfold > Import/Export panel. Click the “Import dummy data”. The layer slider items are included. After importing the dummy data, go to the Layer Slider panel then Export the sliders. Go back to your current installation then Import the sliders.

    Best regards,
    Ismael

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.