Community Forums › Forums › Archived Forums › Design Tips and Tricks › No Scroll on any Genesis- Is it server??
Tagged: Altitude Pro, aspire pro, create_function, No scroll, php deprecated, scroll, site scrolling
- This topic has 9 replies, 4 voices, and was last updated 4 years, 10 months ago by spiezz.
-
AuthorPosts
-
December 17, 2019 at 11:16 am #495538spiezzParticipant
Since I added a big image to the background of section 1, nothing on this site will scroll.
I deactivated all plugins, reinstalled theme, no result.
I activated altitude pro (it was created with aspire pro).
It's not only the homepage,nothing on the site will scroll.Ideas?
http://www.marasitara.com
Please?December 18, 2019 at 9:01 am #495560andytcParticipantIt looks like something is adding overflow:hidden to the body after loading ? Some JS perhaps ?
<body class="home page-template-default page page-id-2 wp-embed-responsive theme-genesis woocommerce-js custom-header header-image header-full-width full-width-content genesis-breadcrumbs-hidden genesis-footer-widgets-hidden front-page featured-section" itemscope="" itemtype="https://schema.org/WebPage" style="overflow: hidden;">
The default body class which is being overridden is -
overflow-x: hidden;
December 18, 2019 at 11:54 pm #495568spiezzParticipantThank you! Progress!When it's switched off in inspector, everything scrolls!
But I can't see where that style for "itemtype" is set. It's not in the css (I see only overflow-x:hidden;) or the index area in the bottom of the customize window.
There is a "overflow:hidden;" for a bunch of different elements on the page but only this one is blocking scrolling on whole site.
I looked up element.style and it's apparently set in js somewhere on the site. I'm using this same theme on my own host (flywheel) and have never had this issue which makes me think that it might be host (media temple).
December 19, 2019 at 10:13 am #495576andytcParticipantI doubt it’s the host , you’ll need to keep searching to find where that’s being added, has it ever scrolled since installing the theme ? Have you added anything new recently ?
December 19, 2019 at 11:03 am #495577spiezzParticipantSo, it's a problem in the functions.php
This is the debug error:Function create_function() is deprecated in /nfs/c10/h08/mnt/178082/domains/marasitara.com/html/wp-content/themes/aspire-pro/functions.php on line 128
Here's the whole line:
// WooCommerce | Display 30 products per page.
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 30;' ), 20 );Tried DELETING Woocommerce and all related plugins and removing line. No improvement.
Here's something I found on replacing create_function
Fix for create_function deprecated in PHP 7.2
KTS915 (@kts915)
1 year, 6 months ago
On line 652 of rest-manager/includes/class-rest-manager-settings.php, it currently says:$callback = create_function('', 'echo "'.str_replace('"', '\"', $section['desc']).'";');
create_function is deprecated in PHP 7.2, so this line should be changed to:$callback = function() { echo str_replace('"', '\"', $section['desc']); };
How exactly do apply this solution?
December 19, 2019 at 11:43 am #495582AnitaCKeymasterDecember 19, 2019 at 11:47 am #495583AnitaCKeymasterP.S. Your code says "Aspire Pro" not "Altitude Pro" as you've tagged this post.
Function create_function() is deprecated in /nfs/c10/h08/mnt/178082/domains/marasitara.com/html/wp-content/themes/aspire-pro/functions.php on line 128
On the WooCommerce number of products line you posted, remove that and add this from WooCommerce - https://docs.woocommerce.com/document/change-number-of-products-displayed-per-page/. I think they changed the code. But not 100% sure.
Need help with customization or troubleshooting? Reach out to me.
December 22, 2019 at 3:31 am #495617Victor FontModeratorcreate_function() was deprecated in PHP 7.2. It's a very easy fix. To fix the issue in the theme change this:
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 30;' ), 20 );
to
add_filter( 'loop_shop_per_page', 'change_woo_cols', 20 ); function change_woo_cols() { return 30; }
This will get rid of the create_function warning, but it won't do anything to help with the overflow issue that was originally being investigated.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?December 23, 2019 at 2:41 pm #495624spiezzParticipantThanks Victor!
I applied other changes mentioned and asked Media Temple to reset server cache but didn't seem like it helped.Any suggestions for how to remove the "overflow:hidden;" command that's preventing scrolling?
Thanks so much,
KarenJanuary 20, 2020 at 3:00 pm #496051spiezzParticipantAfter a lot of investigating I found that it had something to do with the server settings - the php settings on Media Temple.
I opted to move it to my server and there's no problem at all. -
AuthorPosts
- The topic ‘No Scroll on any Genesis- Is it server??’ is closed to new replies.