Solved

Slider stopped working on our site

Posted on 2014-01-16
7
288 Views
Last Modified: 2014-02-22
Hi Experts,

We are launching a new site, and found on production server our slider has stopped working, and not rotating images on the home page...? Baffled...

Can you help us identify the error causing the slideshow not to work?

The link can be accessed on http://www.cityofndola.gov.zm
0
Comment
Question by:kasondeneddy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 1

Expert Comment

by:Smart_Kid
ID: 39784962
looks like this file
...postmessagerelay.js

Open in new window

is missing in your deployed server/ your war/ear file.

Check if the file is available in your war/ear file thats is deployed.


Also see if all the .js files are there
0
 

Author Comment

by:kasondeneddy
ID: 39785119
Thanks for the response, checked files and everything is there...

Just disabled a plugin and it worked... :-) Guess a plugin issue caused it, conflict in js
0
 
LVL 1

Expert Comment

by:Smart_Kid
ID: 39785143
Good to hear that.

If you debug your browser, you could see the errors.
In Chrome / Firefox browser, Press F12 to open the developer tool and goto the Console tab to see errors.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:kasondeneddy
ID: 39785176
Noted..with thanks..its a plugin, but actually need to use the plugin...looking at support seeing js conflict somewhere in it, can you help me resolve?
0
 

Author Comment

by:kasondeneddy
ID: 39785188
I can see...

require_once('../../../wp-load.php');

inside the plugin, that is wrong..but dont know whether to delete it, or how to work around it.
0
 

Accepted Solution

by:
kasondeneddy earned 0 total points
ID: 39785256
Hi Guys,

FAQ plugin causing the issue... has the following code, which I believe wp_load is causing issues:

<?php 
	require_once('../../../wp-load.php');
	require_once('../../../wp-admin/includes/admin.php');
	do_action('admin_init');
 
	if ( ! is_user_logged_in() )
		die('You must be logged in to access this script.');
 
	if(!isset($indianic_faq))
		$indianic_faq = new iNIC_faq();
    
    $_group_list_options = false;
    $_group_list = $indianic_faq->wpdb->get_results("SELECT g.*, COUNT(q.id) AS question FROM {$indianic_faq->wpdb->prefix}inic_faq_group g LEFT JOIN {$indianic_faq->wpdb->prefix}inic_faq_question q ON (g.id = q.group_id) GROUP BY g.id");
    if($_group_list) {
      foreach($_group_list as $_group_list) {
        $_group_list->status = $_group_list->status ? "Active" : "Inactive";
        $_group_list_options .= "<option value=\"{$_group_list->id}\">{$_group_list->group_name} ( {$_group_list->status} ) ( {$_group_list->question} Questions )</option>";
      }
    }
    global $indianic_faq;
?>
(function(){
	tinymce.create('tinymce.plugins.inicfaqs', {
		createControl : function(id, controlManager) {
			if (id == 'iNICfaqs_button') {
				var button = controlManager.createButton('iNICfaqs_button', {
					title : 'Faqs Shortcode', // title of the button
					image : '<?php echo $indianic_faq->pluginUrl; ?>icon_shortcode.png',  // path to the button's image
					onclick : function() {
						var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width;
						W = W - 80;
						H = H - 84;
						tb_show( 'IndiaNIC FAQs Shortcode', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=inicfaqs-form' );
					}
				});
				return button;
			}
			return null;
		}
	});

	tinymce.PluginManager.add('inicfaqs', tinymce.plugins.inicfaqs);
	
	jQuery(function(){
		var form = jQuery('<div id="inicfaqs-form"><table id="inicfaqs-table" class="form-table">\
			<tr>\
				<th><label for="faqs_group">FAQs Group</label></th>\
				<td><select name="faqs_group" name="faqs_group"><?php echo $_group_list_options; ?></select><br /></td>\
			</tr>\
			<tr>\
				<th><label for="faqs_search_box">Show Search Box</label></th>\
                <td><select name="faqs_search_box"><option value="default">As per Group</option><option value="1">Yes</option><option value="0">No</option></select><br />\
				<small>place a search box above the group questions on the front-end</small>\
			</tr>\
			<tr>\
				<th><label for="faqs_ask_box">Show Ask Box</label></th>\
                <td><select name="faqs_ask_box"><option value="default">As per Group</option><option value="1">Yes</option><option value="0">No</option></select><br />\
				<small>place a submission box below the group questions for users to ask question</small>\
			</tr>\
		</table>\
		<p class="submit">\
			<a href="javascript:void(0)" id="inicfaqs-shortcode-submit" class="button-secondary"><strong>Insert FAQs Shortcode</strong></a>\
		</p>\
		</div>');
		
		var table = form.find('table');
		form.appendTo('body').hide();
        
		form.find('#inicfaqs-shortcode-submit').click(function(e){
			
			var shortcode = '[iNICfaq';
            shortcode += ' id='+table.find('select[name=faqs_group] option:selected').attr('value');
            
            var search_box_val = table.find('select[name=faqs_search_box] option:selected').attr('value');
            if(search_box_val != 'default') {
              shortcode += ' searchbox='+search_box_val;
            }
            
            var ask_box_val = table.find('select[name=faqs_ask_box] option:selected').attr('value');
            if(ask_box_val != 'default') {
              shortcode += ' askbox='+ask_box_val;
            }
			
			shortcode += ']';
            
			tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
			tb_remove();
		});
	});
})()

Open in new window

0
 

Author Closing Comment

by:kasondeneddy
ID: 39878988
Found the problem myself...seems like EE helps to think creatively by posting on community
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question