Open asimakos opened 3 years ago
The /search
URL should find the packages/forms/dmSimpleSearch content type alias "search" and then render the webskins/dmSimpleSearch/displayTypeBody.cfm view (since this is a view on the type, rather than a view on an object instance). For it to return a 404 is a little odd.
Instead of relying on the friendly URL you can try to go to the search page directly with a URL like this; /index.cfm?type=dmSimpleSearch&view=displayPageStandard&bodyview=displayTypeBody
If that works, then there is a friendly URL issue with /search that would need to be debugged.
The basic search implementation is a simple SQL like search, it's not ideal for a large production site but useful for demo purposes or small sites. You can modify packages/forms/dmSimpleSearch.cfc to add more functionality. For larger sites we usually lean on a search engine like SOLR or AWS Cloudsearch (there are plugins for those, but there is complexity that goes with it).
Fortunately, it's a friendly URL issue. Any idea how i proceed with debug=1 as i get no feedback by using it?
Regards
Hello! According to your recent proposal for /search URL friendly issue, i just found the following entry (same friendly url search issue with mine) https://discourse.farcrycore.org/t/closed-chelsea-sample-project-search-is-broken-post-install/352 Is that right or not?
Regards
Ahhh right, that means it was a Core bug. If you update "core" to the head of the p720 branch (7.2 maintenance branch) it should resolve the issue.
On Mon, 31 May 2021, 10:38 pm Konstantinos Asimakopoulos, < @.***> wrote:
Hello! According to your recent proposal for /search URL friendly issue, i just found the following entry (same url search issue with mine) https://discourse.farcrycore.org/t/closed-chelsea-sample-project-search-is-broken-post-install/352
Regards
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/farcrycore/core/issues/102#issuecomment-851462785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVQDKO7ECP5CKHG7VMMJ3TQN7NJANCNFSM45ZIB3OQ .
Is there a standard procedure via webtop that I have to follow and how? I just found the correct article to do it carefully https://discourse.farcrycore.org/t/upgrade-from-7-1-0-to-7-1-3/489/2 Is that right or not?
Thanks a lot for your help.
I just updated successfully farcry core to a new version (7.2.x - core files only), where i have now got additional webtop opportunities via appropriate menus. Unfortunately /search url friendly problem still remains. Do you mind if i could send you my farcry core files in order to take a closer look? That would help me a lot!
Regards
I send you the link (https://we.tl/t-OHlO8Cm4cI) in order to get a better view of my specific problem.
Regards
Unfortunately i tried both options (Site Navigation) and Rebuild Friendly URL via admin, but nothing happened. Problem still remains and i do not know what to do.
Regards
Nothing happened again!
Regards
You have friendly URLs setup in your web server right? Apache or IIS rewrite rules are setup?
Unfortunately i do not use either Apache or IIS as i come from Cfwheels - Framework One (fw/1) background where Commandbox is a necessary tool. I use the following configuration without --rewritesEnable option.
My urlrewrite.xml for Lucee is the following:
Regards
OK well, I guarantee that is your problem. You have no rules setup to help FarCry convert the friendly urls. I've not used commandbox so I don't know how to tell you to change that rewrite rule, but just looking at it, it is not compatible with FC's friendly URLs system. Compare those to the friendly URL schemes in the farcry documentation
I think that it should be a way to do it with Commandbox. Is there any way to revert /search back to non friendly url? I have not used FU plugin yet and i think if i do it i will have got problem or not?
Regards
set application.fc.factory.farFU.turnOff();
in a file called <project root>/config/_serverSpecificAfterInit.cfm
this will tell FC to use no friendly URLs when building URLs
if you want to use friendly urls you can try:
adding farcry|webtop
to the pipe delimited list in your first rewrite condition and then change the <from>
and <to>
sections to this:
<from>^([a-zA-Z0-9\/\-\%\+:\[\]\{\}\|\;\<\>\?\,\*\!\@\#\$\ \(\)\^_`~]*)$</from>
<to type="passthrough">/index.cfm?furl=$1</to>
I haven't used Tuckey for rewrites but these are what I use for Apache and it looks to use a similar regex syntax.
I made the following changes and start - stop server via commandbox but nothing. Regarding application.fc.factory.farFU.turnOff();
, i do not see any _serverSpecificAfterInit.cfm in my project's config folder.
Regards
sorry it should be called _serverSpecificVarsAfterInit.cfm
Also your image clearly shows an XML syntax issue. You can't have the <
character there so you'll need to escape it. Should be < I'd think but I don't know Tukey's syntax so you'll need to research how to escape XML characters. Perhaps you can just wrap it in a CDATA.
I also tried the following without success. If you could find a better solution, otherwise i will proceed with non friendly url and finally hope not to have got any problem.
Regards
i believe the cdata needs to wrap the entire contents of the element not just that one character. at least, I've never seen the cdata used that way
I dropped an email yesterday to tuckey.org with this urlrewrite issue, but still i have not got any reply. I added this line into _serverSpecificVarsAfterInit.cfm to disable FU
<cfscript>
application.fc.factory.farFU.turnOff();
</cfscript>
but still the same issue /search?q=blabla (404 error)
Regards
Well yeah that’s a friendly url...
On Tue, Jun 8, 2021 at 7:24 AM Konstantinos Asimakopoulos < @.***> wrote:
I dropped an email yesterday to tuckey.org https://tuckey.org/urlrewrite/#support with this urlrewrite issue, but still i have not got any reply. I added this line into _serverSpecificVarsAfterInit.cfm to disable FU
application.fc.factory.farFU.turnOff(); but still the same issue /search?q=blabla (404 error)
[image: noFU] https://user-images.githubusercontent.com/15226087/121176593-108f2200-c865-11eb-94ce-d516f1d5293a.png
Regards
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/farcrycore/core/issues/102#issuecomment-856680636, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4TZO2MZVHZBIJNXXD3Y3TRX4XVANCNFSM45ZIB3OQ .
-- Sean Coyne n42 Designs @.*** http://www.n42designs.com/ http://about.me/seancoyne
I also found the same instructions here with more comments. Should i try the opposite <cfset application.fc.factory.farfu.turnon() />
now?
Additionally in my webtop there is Admin | reload application | miscellaneous (Friendly url). I also tried it, but i would like to ask of its purpose?
Regards
If you want to use friendly URLs they are enabled by default in the framework typically but sometimes FC can fail to detect that they are supported by the web server so you can manually use the turnOn()
call to force them. If you don't want to use them, you can force them off using turnOff()
.
Reload application in the webtop will reinitialize FarCry which is required when you make certain changes such as configuration changes in FarCry's files or metadata changes in your custom content types. The change you made in _serverSpecificVarsAfterInit.cfm, for example would have required a reinit in order for FC to pick up the change.
I followed carefully your instructions but as soon as i reinit the app, it takes too much time to reload the Home page app without effect. I have been waiting for ages without effect. On the contraty when i removed the <cfset application.fc.factory.farfu.turnoff() /> and reinit the app, voila no waiting time at all, everything runs smoothly! I use FarCry Core 7.2.8 and i think it is extremely difficult to disable FU.
Is there any way to change chelsea theme and install another one in order to overcome this problem?
Thanks a lot!
The real solution for your Friendly URL issues is to find a proper set of rewrite rules for Tuckey or use an actual web server instead of commandbox and use one of the known Apache/nginx/IIS rewrite rules that the community knows will work. Perhaps someone with Daemon (the creators of FarCry) has experience using FC with commandbox and can recommend a set of Tuckey rewrite rules. I do not so I cannot suggest anything other than the thoughts I had already shared earlier in this thread.
All a theme is is a set of webskins. You'll find these in the webskins directory. There are subdirectories for each content type. You can write your own custom webskins there, replace them with a different theme. For what it's worth, I don't know of anyone who uses a FarCry powered site and doesn't create their own webskins. The themes are typically used either for demos or just as a starting point.
In any case, the only problem you seem to have is related to Friendly URLs which is a feature of FarCry core, not the Chelsea theme so any pre-made theme you were to use (if there even are any for FC, I can't think of any) would still attempt to use Friendly URLs if the framework thinks they are enabled and likely still give you issues. You'll need to work out your issues with the Friendly URL rewrites in order to get Friendly URLs to respond for you. Otherwise your webserver (whatever it is that runs under the hood for commandbox) will not know how to translate it to /index.cfm?furl=/some/friendly/url
.
I'd think that
<from><![CDATA[^([a-zA-Z0-9\/\-\%\+:\[\]\{\}\|\;\<\>\?\,\*\!\@\#\$\ \(\)\^_`~]*)$]]></from>
might be the solution, but again, I've not used Tuckey so I can't be sure.
Hello again! I have not got any reply yet from Daemon since our last conversation and despite the fact that i had also sent them an email for this issue. Anyway I searched over Commandbox documentation (embedded Lucee server) and i found out that there is an option for Apache mode_rewrite via .htaccess supported by Tuckey (further details here). I have placed the .htaccess syntax into my specific commandbox folder app (court) mentioned here, but unfortunately my main app doesn't start at all.
.htaccess for FarCry
RewriteEngine On
RewriteCond %{REQUEST_URI} !(^/farcry|^/webtop|^/flex2gateway|^/flashservices|^/CFIDE)($|/)
RewriteRule ^([a-zA-Z0-9\/\-\%:\[\]\{\}\|\;\<\>\?\,\*\!\@\#\$\ \(\)\^_`~]*)$ /index.cfm?furl=$1 [L,PT,QSA]
I got the following screen
and using of course commandbox server log, i get the following quite messy screen
Could you check it as a favour for me please because you are definitely more advanced and experienced developer and user of FarCry framework? I think it would help me a lot as i think that i am too close for the solution of friendly url requests.
Regards once more!
I tried one more time. Fortunately the web app worked where I got an application update message, but /search problem still remains. I do not know what is happening wrong. Regards
I can't really help you with Commandbox. I haven't used it with FarCry and I've only played around with it a bit when it first released. Your issue with the /search page is because you do not have friendly URLs setup correctly. Once you straighten out Friendly URLs your issue will be fixed. We know this because when you use the non-Friendly URL, the search functionality works fine.
If you can't get it to work in Commandbox, I suggest setting up a real web server (Apache, IIS, nginx) in front of either Adobe ColdFusion or Lucee, using the supported friendly URL configurations.
@asimakos Please post on the Ortus Community forum https://community.ortussolutions.com/ and we'll help you convert your rewrite rules to use Tuckey or Undertow's predicate language (server rules, as CommandBox calls them). When you post, please also include the FULL stack trace from your screenshot above. That's not a normal looking error and is possibly related to your Java version, so you should get to the bottom of that as well.
Hello again!
I have installed chelsea theme (FarCry Core), but unfortunately when i use the searchbar no results are returned.
Perhaps this searchbar will be afterwards valuable to me for my new content type. Any idea how to fix it and also include my new content type within its search scope.
Regards