-
AuthorPosts
-
March 4, 2023 at 2:54 am #1400074
Hi,
We are experiencing a problem with our CMS. Basically when logged in as an Admin and click on ‘visit site’ a lot of things are not working (burger menu does not open, image gallery foes not load properly, color sections are missing …
This issues are not reproduced in the frontend, so basically if user is not logged in the site works just fine.
We contacted wordpress suport (they are hosting the site) and they said there was an php warning linked to line 49 of our functions.php file, and suggested to contact PMPro support since that part of code was related to a PMPro customization. We did, and the guys at PMPro said it was unrelated.If it’s of any help, this issue seemed to start when we tried to include facebook events via Smashballoon. We already removed the function (now we are just showing facebook feed), not sure if this can help you figure it out.
I’d really appreciate you looking into this.
Sending you an admin access so you can see the issue and compare the site when you are not logged in (everything works) and when you are (preview fails).
Thanks!!
March 4, 2023 at 10:36 pm #1400130Hey nasi,
Thanks for your question but the login doesn’t work please check.
As I understand you had PMPro customization in your functions.php and WordPress support recommended removing it, and when you did the error was solved, correct?
But you want to use the PMPro customization and PMPro can’t offer you a new code that won’t cause the error?
Any you also tested the PMPro customization with all other plugins disabled and the error still occurs?Best regards,
MikeMarch 8, 2023 at 12:28 pm #1400460Hey Mike, thanks for your reply.
The website is hosted at wordpress, so after inserting the credentials I posted I think you need to request them to send you a password to your email? Apparently you cannot access directly from the Login/password section on the http://www.yourwebsite.com/wp-admin.
No idea why this is happening, but the user I sent is active. I reset the password, it’s included in the Private content area.
Could you please guide me on how to grant you access, or try it again?As for your question, what wordpress support suggested is to contact PMPRO. Not to remove the code from functions.php.
And the guys at PMPRO said the code was not creating this issue. I’ll attach all the code to this message so you can have a look.
The code has been there for months and everything was working just fine till last week.Anyway, what is not working is the preview of the website on the backend, when you are logged in as an Admin.
Would be great if you could manage to login and have a look.Thanks!!
Nasi
March 8, 2023 at 2:10 pm #1400480Hi,
Thanks for the feedback, I see your site was giving this error:
jQuery.Deferred exception: Cannot read properties of undefined (reading 'setDefaults') TypeError: Cannot read properties of undefined (reading 'setDefaults')
for this code:function my_datepicker_defaults() { ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery.datepicker.setDefaults({ minDate: 0, maxDate: "+12m" }); }); </script> <?php } add_action('wp_footer', 'my_datepicker_defaults', 20);
I adjusted to this:
function my_datepicker_defaults() { ?> <script type="text/javascript"> window.addEventListener('DOMContentLoaded', function() { (function($) { jQuery.datepicker.setDefaults({ minDate: 0, maxDate: "+12m" }); }(jQuery)); }); </script> <?php } add_action('wp_footer', 'my_datepicker_defaults', 20);
and now your menu opens, please clear your browser cache and check.
Best regards,
MikeMarch 9, 2023 at 3:39 pm #1400571Hi Mike,
Thanks so much for looking into this and fixing the issue.
Really appreciate it!Working fine now, you can close the thread.
Big Thank you!
March 9, 2023 at 7:10 pm #1400583Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Backend issues’ is closed to new replies.