<![CDATA[ Mobile Menu Stopped Working after 2.6.5 upgrade...help - My Forums]]> https://forums.modx.com/thread/?thread=104688 <![CDATA[Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563079 here. The code is below. Can you see why this would stop working after the upgrade?

Thanks

<div class="hidden-md hidden-lg  menuwrap quabg ">
		<div class="col-md-6">
			<a class="mdx_logo" href="[[++site_url]]">
			<img src="[[++Logo_mobile_image]]" alt="logo"/>
			</a>
		</div>
		
		<div class="col-md-6">		
			<input type="checkbox" id="nav-trigger" class="nav-trigger" />
			<label for="nav-trigger" onclick="showhide()"></label>
			
				
		
				[[pdoMenu?
					&parents=`0`
					&parentRowTpl=`@INLINE <li class="innerrow"><a href="[[+wf.link]]">[[+wf.linktext]]</a>[[+wf.description]]  [[+wf.wrapper]]</li>`
					&rowTpl=`@INLINE <li [[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li>`
					&outerTpl=`@INLINE<ul class="navigation" id="first-ul" style="display:none;*display:none;">[[+wf.wrapper]]</ul>
					<script>function showhide(){var e=document.getElementById("first-ul");e.style.display="none"==e.style.display?"block":"none"}</script>`
					&tplInner=`@INLINE 
					<input type="checkbox" id="nav-trigger-arr[[+id]]" class="nav-trigger-arr[[+id]]" />
					<label for="nav-trigger-arr[[+id]]"  onclick="showhide[[+id]]()" class=""></label>
					<style>
							  .nav-trigger-arr[[+id]] + label{transition:left .2s; display:block;*display:block}
							  .nav-trigger-arr[[+id]] {position:absolute;clip: rect(0,0,0,0);}
							  .nav-trigger-arr[[+id]]:checked ~ .innerul {height:auto;display:block;*display:block}							 
							  .nav-trigger-arr[[+id]]:checked + label {right: 15px;}
							  label[for="nav-trigger-arr[[+id]]"]:before{
									content: "";
									float: right;
									font-family: FontAwesome;
									font-size: 17px;
								}
							 label[for="nav-trigger-arr[[+id]]"] {position: absolute;right: 15px;margin-top:-32px;z-index: 9999;cursor: pointer;width: 32px;height: 32px;background-repeat:no-repeat; }
					</style>
						
						<script>
							function showhide[[+id]](){var e=document.getElementById("sm-ul[[+id]]");e.style.display="none"==e.style.display?"block":"none"}
						</script>


						<ul class="innerul" id="sm-ul[[+id]]" style="display:none;*display:none;">
							[[+wf.wrapper]]
						</ul>`
			]]
		</div>
</div>	
]]>
jasonmonette Dec 04, 2018, 03:34 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563079
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563090 How did you find these? And what do I need to do to fix them?
you can use the developer's tools of your browser in firefox or chrome or really any browser to see them. just load the page and watch the console

they don't look serious if the problem is fixed its probably ok]]>
nuan88 Dec 04, 2018, 08:42 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563090
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563089 Quote from: andytough at Dec 04, 2018, 07:09 PM
What version of MODX were you upgrading from?

Had your site been hacked prior to the upgrade?


Not that I am aware of



Attached is a screen shot of the errors that are being generated when your page is being accessed.


How did you find these? And what do I need to do to fix them?



If no other changes were made to the site other than the upgrade then it may help to do the following, if you have not already:


  • Ensure that all Extras are also upgraded
  • Check the file and folder permissions are correct (probably 755 for folders and 644 for files - with the exception of the config file which should be 400)
  • Delete the contents of the /core/cache/ folder
  • Check the version of PHP that is running on the server and that it is compatible with MODX 2.6.5 and all the extras installed


yep did all that.

]]>
jasonmonette Dec 04, 2018, 08:04 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563089
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563088
Changed
<script>function showhide(){var e=document.getElementById("first-ul");e.style.display="none"==e.style.display?"block":"none"}</script>


to

<script>
						function showhide() {
							var e = document.getElementById("first-ul");
							if (e.style.display === "none") {
								e.style.display = "block";
							} else {
								e.style.display = "none";
							}
						}

					</script>


and

<script>
                            function showhide[[+id]](){var e=document.getElementById("sm-ul[[+id]]");e.style.display="none"==e.style.display?"block":"none"}
                        </script>


to

<script>
							function showhide[[+id]]() {
							var e = document.getElementById("sm-ul[[+id]]");
							if (e.style.display === "none") {
								e.style.display = "block";
							} else {
								e.style.display = "none";
							}
						}
						
						</script>


And now it is working.]]>
jasonmonette Dec 04, 2018, 07:43 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563088
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563084
Had your site been hacked prior to the upgrade?

Attached is a screen shot of the errors that are being generated when your page is being accessed.

If no other changes were made to the site other than the upgrade then it may help to do the following, if you have not already:


  • Ensure that all Extras are also upgraded
  • Check the file and folder permissions are correct (probably 755 for folders and 644 for files - with the exception of the config file which should be 400)
  • Delete the contents of the /core/cache/ folder
  • Check the version of PHP that is running on the server and that it is compatible with MODX 2.6.5 and all the extras installed

On a separate note it might be worth considering making the site a little more secure by following the guidelines here. Since the pre 2.6.5 hacks this has become very relevant: https://docs.modx.com/revolution/2.x/administering-your-site/security/hardening-modx-revolution]]>
andytough Dec 04, 2018, 07:09 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563084
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563083
<script>
                            function showhide[[+id]](){var e=document.getElementById("sm-ul[[+id]]");e.style.display="none"==e.style.display?"block":"none"}
                        </script>


Quote from: lkfranklin at Dec 04, 2018, 04:56 PM
It's an issue with your javascript. showhide() is not defined anywhere.
]]>
jasonmonette Dec 04, 2018, 05:52 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563083
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563082
Quote from: lkfranklin at Dec 04, 2018, 04:56 PM
It's an issue with your javascript. showhide() is not defined anywhere.
]]>
jasonmonette Dec 04, 2018, 05:42 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563082
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563081
Quote from: lkfranklin at Dec 04, 2018, 04:56 PM
It's an issue with your javascript. showhide() is not defined anywhere.

]]>
jasonmonette Dec 04, 2018, 05:41 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563081
<![CDATA[Re: Mobile Menu Stopped Working after 2.6.5 upgrade...help]]> https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563080 lkfranklin Dec 04, 2018, 04:56 PM https://forums.modx.com/thread/104688/mobile-menu-stopped-working-after-2-6-5-upgrade-help#dis-post-563080