Kunal Kapoor
Full Member
  
Posts: 145
Effective, Functional, Standards Compliant
|
 |
« Reply #45 on: Feb 17, 2006, 05:17 AM » |
|
All these fixes are starting to confuse me. Is there any chance somebody can attach a fully patched version of document.parser.class.inc.php that we can just swap out for the original?
I have just come across this problem also. It took me a while to implement the fixes, but attached is my patched version of document.parser.class.inc.php. I have applied the fixes found in these posts: I have also included a little fix of my own. I removed [/list] language='JavaScript' found in two places. On line 1962 and line 1972. This is to conform to the XHTML Strict 1.0 standard as this attribute was deprecated. (Should I log this in the bugtracker?) Another bug I found is that on line 1949: $this->sjscripts[count($this->sjscripts)] = "<style type='text/css'>@import:url($src)</style>"; did not seem to be behave when @importing CSS. So I removed the colon ( :) between @import and url, and it seems to work fine. I also changed the single quotes into double quotes. Not neccessary, just me being picky. I use double quotes in attributes throughout my HTML, that's all. You need to place the document.parser.class.inc.php file in the /manager/includes/ folder. The other file, FileComparisonReport.html is a HTML report outlining the direct differences between the original file that shipped with MODx 0.9.1 (on the right), and my altered version including all the fixes above (on the left). For some reason however, I'm getting these two lines in my HTML source before the $modx->regClientStartupScript I've inserted: <script type="text/javascript">var MODX_MEDIA_PATH = "media";</script> <script type="text/javascript">var MODX_MEDIA_PATH = "media";</script> Any ideas?
|
|
|
« Last Edit: Aug 21, 2006, 02:49 PM by Kunal Kapoor »
|
Logged
|
|
|
|
rthrash
Foundation

Posts: 9,509
|
 |
« Reply #46 on: Feb 17, 2006, 09:02 AM » |
|
I've seen the double media path as well. I'm not sure what's causing it, but it'd be good to find out. Thanks for the great work on regClient...
|
|
|
|
|
Logged
|
MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
|
|
|
Kunal Kapoor
Full Member
  
Posts: 145
Effective, Functional, Standards Compliant
|
 |
« Reply #47 on: Feb 17, 2006, 09:24 AM » |
|
I've seen the double media path as well. I'm not sure what's causing it, but it'd be good to find out.
I have found 6 instances of var MODX_MEDIA_PATH: <script type="text/javascript">var MODX_MEDIA_PATH = "<?php echo IN_MANAGER_MODE ? "media":"manager/media"; ?>";</script> <script type="text/javascript">var MODX_MEDIA_PATH = "<?php echo IN_MANAGER_MODE ? "media":"manager/media"; ?>";</script> <script type="text/javascript">var MODX_MEDIA_PATH = "<?php echo IN_MANAGER_MODE ? "media":"manager/media"; ?>";</script> var MODX_MEDIA_PATH = "media"; // set media path <script type="text/javascript">var MODX_MEDIA_PATH = "<?php echo IN_MANAGER_MODE ? "media":"manager/media"; ?>";</script> $modx->regClientStartupScript('<script type="text/javascript">var MODX_MEDIA_PATH = "'.(IN_MANAGER_MODE ? 'media':'manager/media').'";</script>'); If you comment out the last instance, it seems to work fine and both those MODX_MEDIA_PATHs disappear. Are there any consequences to this?
|
|
|
|
« Last Edit: Feb 17, 2006, 09:34 AM by Kunal Kapoor »
|
Logged
|
|
|
|
rthrash
Foundation

Posts: 9,509
|
 |
« Reply #48 on: Feb 17, 2006, 09:30 AM » |
|
LOL... only 6, why when I was a childe we had TWELVE copies of the code in MODx... and we LIKED IT!
(seriously, that's crazy!)
|
|
|
|
|
Logged
|
MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
|
|
|
Kunal Kapoor
Full Member
  
Posts: 145
Effective, Functional, Standards Compliant
|
 |
« Reply #49 on: Feb 17, 2006, 09:33 AM » |
|
Only the last one seems to matter though. Commenting that out seems to resolve the issue. The comment attached to it is: // set media path for js scripts So I'm not entirely sure if commenting it out was completely safe at all.
|
|
|
|
« Last Edit: Mar 07, 2006, 12:26 PM by Kunal Kapoor »
|
Logged
|
|
|
|
rthrash
Foundation

Posts: 9,509
|
 |
« Reply #50 on: Feb 17, 2006, 09:40 AM » |
|
Actually, it makes sense to comment that one out because a TV formatter will never be present without at least one of the other items. We'll need to let someone who knows definitively though make the final call.
|
|
|
|
|
Logged
|
MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
|
|
|
OpenGeek
MODx Co-Founder
Foundation

Posts: 5,006
looking a little more like my avatar again...
|
 |
« Reply #51 on: Feb 17, 2006, 09:57 AM » |
|
Actually, that last instance for TVs is the only one that would affect the front-end of the web site. And it may be required in order for a TV with a widget which depends on resources in the MEDIA_PATH folder to render in the front-end; I'm just not sure what those dependencies are off hand. It may affect QuickEdit as well, but Adam could tell us better...
|
|
|
|
|
Logged
|
Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual.
— Frank Herbert
|
|
|
Djamoer
Testers

Posts: 1,492
No one can limit a man other than the man himself.
|
 |
« Reply #52 on: Feb 17, 2006, 10:21 AM » |
|
The last call will be made from Adam then 
|
|
|
|
|
Logged
|
|
|
|
aNoble
Coding Team

Posts: 679
|
 |
« Reply #53 on: Feb 17, 2006, 10:35 AM » |
|
I'm pretty sure it's not being used by QE for anything and a quick grep confirmed that. The only places it seems to be really used is in /manager/media/scripts/modx.js to include /manager/scripts/bin/webelm.js which seems to be Raymonds baby. So I'd say, ask Raymond  I'm not even sure what webelm is for honestly. It appears to be a sort of a javascript toolkit.
|
|
|
|
|
Logged
|
|
|
|
Kunal Kapoor
Full Member
  
Posts: 145
Effective, Functional, Standards Compliant
|
 |
« Reply #54 on: Feb 17, 2006, 10:39 AM » |
|
I hope I haven't picked at a thread which just unravels everything else. 
|
|
|
|
|
Logged
|
|
|
|
aNoble
Coding Team

Posts: 679
|
 |
« Reply #55 on: Feb 22, 2006, 12:24 PM » |
|
If your are using the weblogin snippet you may have noticed that it doesn't give any errors when you login with the wrong username or password (or any other errors like blocked accounts). There is a very simple fix for this. Edit /assets/snippets/weblogin/weblogin.inc.php. Find the line with the code below (it should be line 91) $output = ob_get_contents(); and change it to $output .= ob_get_contents(); This will prevent the error output from being overwritten and should give you a javascript alert with the appropriate error.
|
|
|
|
|
Logged
|
|
|
|
rthrash
Foundation

Posts: 9,509
|
 |
« Reply #56 on: Feb 22, 2006, 01:49 PM » |
|
One more for webuser logins. When using the password resetter (forget your password? link), it will in fact update the password, but not unblock a user if they've goofed more than the allowed number of times. The fix committe for 0.9.2 is as follows. In assets/snippets/weblogin/weblogin.processor.inc.php, change: // activate new password $newpwd = md5($newpwd); $sql="UPDATE $dbase.".$table_prefix."web_users SET password = '".$newpwd."', cachepwd='' WHERE id=".$row['id']; $ds = $modx->dbQuery($sql);
// invoke OnWebChangePassword event if(!$ds) $modx->invokeEvent("OnWebChangePassword", array( "userid" => $id, "username" => $username, "userpassword" => $newpwd )); if(!$ds) $output = webLoginAlert("Error while activating password."); To: // activate new password $newpwd = md5($newpwd); $sql="UPDATE $dbase.".$table_prefix."web_users SET password = '".$newpwd."', cachepwd='' WHERE id=".$row['id']; $ds = $modx->dbQuery($sql);
// unblock user $sql="UPDATE $dbase.".$table_prefix."web_user_attributes SET blockeduntil = '0' WHERE internalKey=".$row['id']; $ds2 = $modx->dbQuery($sql);
// invoke OnWebChangePassword event if(!$ds || !$ds2) $modx->invokeEvent("OnWebChangePassword", array( "userid" => $id, "username" => $username, "userpassword" => $newpwd )); if(!$ds || !$ds2) $output = webLoginAlert("Error while activating password.");
|
|
|
|
« Last Edit: Feb 22, 2006, 01:50 PM by rthrash »
|
Logged
|
MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
|
|
|
Kunal Kapoor
Full Member
  
Posts: 145
Effective, Functional, Standards Compliant
|
 |
« Reply #57 on: Feb 27, 2006, 04:59 AM » |
|
I'd just thought I'd throw this post in for WebSignup (so it can generate random password upon registration so people can verify their web user's email addresses.) http://modxcms.com/forums/index.php/topic,3050.0.html
|
|
|
|
|
Logged
|
|
|
|
snowflip
Jr. Member

Posts: 14
|
 |
« Reply #58 on: Mar 03, 2006, 10:07 PM » |
|
Hello, I was looking for a solution to a problem I'm having and it looks like someone else had the exact same problem (quoted below). It says "solved" but I haven't been able to find a solution. Does anyone know how this problem was fixed? I updated from 0.9.0 to 0.9.1 and after updating my links are messed up: If I click on a link from "Home" I'm okay. But once I click on another link that is "deeper" my links in the menu change. For example, what used to be http://languagelearner.com/eslarticles.htm now changes to http://languagelearner.com/eslarticles/eslarticles.htm . If I type in the URLs by hand, there's no problem...the documents are still there. It's just that the menu links have changed and added the additional folder instead of base index. I'm using a chunk that someone set up for me so that the menu items show up on the left-hand side <div class="sidenav">[[DropMenu? &menuName=`LeftColNav` &removeNewLines=`true` &startDoc=`0` &levelLimit=`2` &hereClass=`activeLink` ?startDoc=1 &topnavClass=`sidenav`]]</div> and then a snippet that goes with it. <ul class="sidenav">
<li><a href="#">Link here</a></li> <li><a href="#">Another link</a></li> <li><a href="#">A third link</a></li> </ul> Any help would be appreciated. Sincerely, Sam
|
|
|
|
|
Logged
|
|
|
|
OpenGeek
MODx Co-Founder
Foundation

Posts: 5,006
looking a little more like my avatar again...
|
 |
« Reply #59 on: Mar 03, 2006, 11:08 PM » |
|
Hello snowflip, it looks like you are using the friendly alias paths option, and in 0.9.1 we removed a forced fix for this from the core, making it necessary for you to add this to your templates if you structured your site in such a way as to require absolute links to get back to the root of the site. Try adding the following to the top of your HEAD element in your template( s ) and see if that solves the problem: <base href="[(site_url)]" /> Let me know if that doesn't help.
|
|
|
|
« Last Edit: Mar 19, 2006, 03:31 AM by OpenGeek »
|
Logged
|
Jason Coward
MODx Co-Founder
xPDO Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
If you think of yourselves as helpless and ineffectual, it is certain that you will create a despotic government to be your master. The wise despot, therefore, maintains among his subjects a popular sense that they are helpless and ineffectual.
— Frank Herbert
|
|
|
|