I'm afraid I can't help, but I can at least confirm that I have exactly the same issue running Revo with IIS and SqlServer, so it's possibly SqlServer related. I've been maintaining an Evo' site for a while, but wanted to test Revo' with an eye on upgrading, so I've built a clean Revo/IIS/SqlServer install on Windows, and I see exactly the same problem with FURLS - they render as empty strings in the HTML, so it's nothing to do with the url rewriting (which works fine on Windows & IIS for my Evo' site).
(As an aside, I see no database tables under System Information i.e. it's a blank grid - even though modx is clearly working in all other respects - so SqlServer integration appears to be slightly confused.)
-
MODX Staff
- 10,725 Posts
If someone with access to Windows licenses for the needed software to test/develop MODX on SQL Server would be willing to participate, I would certainly welcome the contributions. I lost my licenses for all the needed Microsoft software last year and all SQL Server development/testing has relied on feedback and contributions from the community ever since.
I think I have identified the bug causing FURLs to fail - and it is indeed to do with the alias_map.
In modcontext.class.php, function getResourceURI (line 395 on my build), the first 'if' clause is 'if (isset($this->aliasMap))' - now unfortunately it is set, but it's set to an empty array. This happens in modcontext.class.php, function prepare (line 88 in my build). In that 'prepare' function, various fields are initialized, one of which is aliasMap - and it's initialized to an empty array, presumably because there are no 'aliases'.
So, back in 'getResourceURI', if you change 'if (isset(...' to 'if (!empty(...', which also tests for an empty array, FURLs start working.
I honestly don't know enough about how the context initialization code works to know if this is a safe thing to do, and presumably there are other tests elsewhere in the code that make the same assumptions about other fields initialized at the same time (I can see config, resourceMap, aliasMap, webLinkMap, eventMap, pluginCache all initialized in the same place) - if all these other tests also use 'isset' rather than '!empty' there will be other bugs.
But the change above does get FURLs working!
Could you report those as separate bugs here:
http://bugs.modx.com, so they won't be forgotten. Thanks.
OK, two bugs logged, 9847 for the main FURL problem, and 9846 for the incorrect call to findResource.
Thank you!
Thanks for this info and many thanks for digging into it.
Quote from: aclcarter at Apr 16, 2013, 11:42 AMIn modcontext.class.php, function getResourceURI (line 395 on my build), the first 'if' clause is 'if (isset($this->aliasMap))'
Can you elaborate on where this file is? In my install (Revo 2.2.6-pl), I can see modcontext.class.php in core/model/modx and core/model/modx/sqlsrv. Neither of these files has a line 395, nor a function called getResourceURI.
Thanks!
Andy
I searched my entire MODX install for getResourceURI and came up empty. I wonder if it's part of an Extra I don't have.
I don't know what to say!
First, it's not in the sqlsrv subclass of modContext, so you won't find it in the sqlsrv subdirectory. And because it's under the 'core' tree I have to assume it's not part of an extension. In my 2.2.7 installation, in directory core/model/modx there is a file called modcontext.class.php. I tried to attach the file here, but for some reason if I do it won't let me 'reply'.
Let me know if you still don't find it!
Cheers,
Andy