Pial
Forum Replies Created
-
Hi @flatword
Thank you for the update! That is indeed unusual, but it’s great to hear that your JavaScript is working now, even after deactivating and deleting BetterLinks.
It’s possible that the issue was related to cached files or a temporary conflict that resolved itself after clearing the cache and removing the plugin. Sometimes, scripts or dependencies can linger in cache, causing inconsistencies until they’re fully cleared.
I understand your cautious optimism—it’s good to monitor the behavior for a bit to ensure it remains stable. If the issue arises again or if anything seems off, feel free to reach out, and I’ll be happy to assist further.
Fingers crossed it stays resolved!
Best regards,
PialHi @flatword
The issue occurs because WordPress doesn’t automatically load jQuery unless explicitly enqueued. BetterLinks likely enqueues it as part of its functionality, which is why your code works when the plugin is active but breaks when it’s deactivated. Additionally,
wp_enqueue_script
is a PHP function and cannot be directly used in WPCode’s JavaScript snippets.To resolve this, you need to enqueue both jQuery and your custom script using WordPress’s standard
wp_enqueue_script
function. Here’s how to do it: Step 1: Add a PHP Snippet in WPCodeSwitch to a PHP Snippet in WPCode and use the following code:
add_action('wp_enqueue_scripts', function () { // Enqueue WordPress's built-in jQuery wp_enqueue_script('jquery'); // Enqueue your custom script wp_enqueue_script( 'custom-script', // Unique handle for your script get_template_directory_uri() . '/path-to-your-script.js', // Replace with your script's file path array('jquery'), // Declare jQuery as a dependency null, // Optional version number true // Load in the footer ); });
Step 2: Replace the Script Path
Update
/path-to-your-script.js
with the actual path to your custom script. For example:get_template_directory_uri() . '/js/my-custom-script.js'
Why This Works
wp_enqueue_script
: This function registers and loads JavaScript files.array('jquery')
: Ensures jQuery is loaded before your custom script.true
(in footer): Ensures the script loads at the bottom of the page for better performance.
Additional Notes
You can learn more about the
wp_enqueue_script
function here in the WordPress Developer Reference.Best regards,
PialHello @flatword
Thanks for the Video, Yes now I understand exactly what’s the issue.
We will include a fix for this in future. In the meantime you can just Close the Notice and it will be removed entirely like this : https://d.pr/i/DPQlJp
Hope it helps
Let me know how it goesHey @flatword
I wanted to follow up regarding the issue you mentioned with the recurring message appearing during page refreshes. Were you able to test by disabling all other plugins except for BetterLinks?If not, no problem—when you get a chance to check, let us know the outcome so we can assist you further in resolving this.
Looking forward to your update!
Best regards,
PialHi @flatword
I just wanted to follow up regarding the issue you reported with your JavaScript not working after deactivating BetterLinks. I shared a few possible causes and troubleshooting steps in my earlier response, and I wanted to check if you’ve had a chance to review them or test any of the solutions.
Let me know how things are going
Best regards,
PialHello @amirhmoradi
We appreciate you bringing this to our attention. To clarify, BetterLinks does not utilize the SPYC library on the frontend. The SPYC dependency is only leveraged by the Device Detector module, which is used on the fly only when a short link is clicked & tracking is Disable . This does not impact the site performance.Based on our findings, since SPYC is not used in any frontend operations, we requested additional details to ensure we address your concerns comprehensively.
If you encounter any Actual performance impacts caused by BetterLinks , we would greatly appreciate it if you could provide specific examples or test cases. Our team is more than happy to investigate and address any legitimate issues as quickly as possible.
That said, we do plan to update the Device Detector in the future to ensure optimal performance and compatibility.
Hope you understandHi @chaosheld
Thank you for sharing your concerns, and I deeply regret hearing about the frustrations you’ve experienced. I understand how upsetting it can be when a plugin doesn’t meet your expectations and disrupts your workflow.
Regarding performance, I’d like to assure you that our team continuously optimizes Essential Addons to provide the best performance. Based on our testing, only the widgets used on a specific page load their assets. However, if you’ve noticed otherwise, I’d truly appreciate it if you could share details about which widgets are being loaded unnecessarily. This will help us investigate and address the issue promptly.
Additionally, I want to clarify that our widgets are not enabled by default unless there’s a dependency. However, I understand that unexpected changes can be frustrating, so we’ll carefully review this feedback to ensure improvements in our future updates. Also, we’ve built a Global Control feature that allows users to enable or disable specific widgets easily. You can check out how it works here: Global Control Demo.
Regarding the notices you mentioned, all our notifications are dismissible, and there’s even an option to prevent them from reappearing entirely. Here’s a quick demonstration on managing notices: Notice Management Demo.
Additionally, even our important notices about the latest releases can be permanently dismissed. You can close them, and they will not appear again. Here’s a demonstrationYour feedback is valuable to us, and we genuinely appreciate the opportunity to improve. If you’re open to sharing specifics about the performance concerns or which pages/widgets are causing issues, we’ll treat this as a top priority and work toward resolving it.
Thank you for taking the time to provide your thoughts, and I hope we can help address your concerns to improve your experience.
Best regards,
PialHello there
Thank you for bringing this to our attention. The notice you’re seeing is related to the
_load_textdomain_just_in_time
function, which triggers when translation files are loaded too early in the plugin’s lifecycle. This typically occurs when certain actions are executed before theinit
hook in WordPress, as outlined in the Debugging in WordPress guide.Please rest assured, this notice does not affect the functionality of the plugin and is only visible when
WP_DEBUG
is enabled. However, we understand the importance of keeping your environment error-free. We’ll review this promptly and issue a release to address it. Kindly note that since Simple 301 Redirects has a more limited feature update schedule, most updates focus on security and critical improvements.In the meantime, I recommend exploring BetterLinks—our advanced URL management tool. It offers robust features to shorten, track, and manage links seamlessly. Plus, if you have a substantial number of existing links, you can easily migrate them to BetterLinks without any hassle.
You can find comprehensive documentation here to help you get started.
Feel free to reach out if you have any further questions!
Best regards,
PialHello @flatword
Thank you for reaching out and providing the detailed explanation of the issue you’re facing. I understand how puzzling this situation must be. Let me break down what’s likely happening and offer some suggestions.
The behavior you’re observing could be due to one of the following:
- Script Dependencies:
BetterLinks might be loading certain JavaScript files, such as jQuery, or resolving dependencies that your custom code indirectly relies on. When BetterLinks is deactivated, those dependencies may not be loaded, causing your code to stop functioning. - Script Loading Order:
BetterLinks might be influencing the order in which scripts are loaded on your site, ensuring everything works correctly. When it’s removed, the script order might change, resulting in your custom code not executing as expected. - Caching or Optimization:
If your site uses caching or optimization plugins, they might be optimized differently when BetterLinks is active. This can result in unexpected behavior when the plugin is deactivated.
Suggested Solutions
- Ensure jQuery is Loaded:
If your script depends on jQuery, it’s essential to ensure it’s being loaded properly when BetterLinks is deactivated. If you’re adding custom code, please confirm it’s properly enqueued in your theme or plugin using this code snippet:
wp_enqueue_script('custom-script', 'path-to-your-script.js', array('jquery'), null, true);
- Check the Console for Errors:
After deactivating BetterLinks, check the browser console for any errors (Press F12 in your browser, then go to the “Console” tab). This can help identify what’s breaking. - Temporarily Disable Optimization Plugins:
If you’re using caching or optimization plugins, try disabling them temporarily to see if the issue persists without BetterLinks. - Test with a Basic Script:
Here’s a simple test you can run to confirm if the issue is related to jQuery:
jQuery(document).ready(function($) { alert("Testing jQuery"); });
Add this to your site after deactivating BetterLinks to see if it works.
Best regards,
PialHi @flatword
Sorry for the inconvenienceCould you please try disabling all plugins except for BetterLinks, and then check if the message continues to appear as described? This will help determine if the issue is directly related to BetterLinks or if another plugin might be causing a conflict.
Let us know the results, and we’ll assist further from there.
Best regards,
PialHello again @wp800s
Hope you are doing well.
About your issue, we still haven’t heard back from you. So, I am assuming your issue has been resolved. I am resolving this topic.
Have a nice day!
Best regards,
PialHello there
Thank you for the fantastic Feedback! We’re Glad to hear that BetterLinks stands out for you and that the dashboard has been such a strong asset for your affiliate needs.Regarding your suggestions:
Direct Access to Link Stats: Great news—this feature is already available! You can directly access each link’s stats by following this approach: see here.
Quick Edit Access: We appreciate the suggestion, and it’s definitely on our radar. We have plans to introduce a quick edit feature for links created through Quick Link Creation, aiming to streamline the editing process even further.
Thank you again for your valuable feedback and support!
Hi @wp800s,
I just wanted to check in to see if you’ve had a chance to implement the changes in your database. Running the command we shared should help re-establish the missing table and restore visibility to the links in your BetterLinks dashboard.
If you’ve encountered any difficulties or have additional questions, please feel free to reach out. We’re here to help make sure everything is working smoothly on your end.
Looking forward to hearing back!
Best regards,
PialHello again @amirhmoradi
Hope you are doing well.
About your issue, We still haven’t heard back from you. So, I am assuming your issue has been resolved. I am resolving this topic.
Have a nice day!
Hello again,
Sorry for the inconvenience.
We did not hear from you since our last conversation.
Could you please let us know if you are still having the issue?
So that we could try to solve your issue.We are waiting for your response.
Thank you.