Solved

Slider stopped working on our site

Posted on 2014-01-16
7
280 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
  • 5
  • 2
7 Comments
 
LVL 1

Expert Comment

by:Smart_Kid
Comment Utility
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
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:kasondeneddy
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Found the problem myself...seems like EE helps to think creatively by posting on community
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now