Change your rewrite rule to not route .htm files to your index.php.
I'm working on a ZF-based Facebook application. All is going relatively smoothly, except I've seem to hit brick wall when it comes to this issue: I've set up a showFeedDialog box in my IFrame application (which handles posting stories to a user's wall). It seems to be looking for xd_receiver.htm as an action within the Analyze controller, however ZF interprets this as a call to that controller's action. THe following is the text that the popup box spits back to me...:
An error occurred
Page not found
Exception information:
Message: Action "xdreceiverHtm" does not exist and was not trapped in __call()
Stack trace:
#0 *absolute path*/library/Zend/Controller/Action.php(515): Zend_Controller_Action->__call('xdreceiverHtmAc...', Array)
#1 *absolute path*/library/Zend/Controller/Dispatcher/Standard.php(289): Zend_Controller_Action->dispatch('xdreceiverHtmAc...')
#2*absolute path*/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#3 *absolute path*/httpdocs/library/Zend/Application/Bootstrap/Bootstrap.php(77): Zend_Controller_Front->dispatch()
#4 *absolute path*/httpdocs/library/Zend/Application.php(346): Zend_Application_Bootstrap_Bootstrap->run()
#5 *absolute path*/httpdocs/public/index.php(26): Zend_Application->run()
#6 {main}
Request Parameters:
array (
'controller' => 'analyze',
'action' => 'xd_receiver.htm',
'module' => 'default',
)
It works fine with IE -- No problems. Firefox on the other hand, not so much... So my question is this: How do I fix this? xd_receiver.htm is located at /public/xd_receiver.htm, but I suppose I copy it to another location as well.
For those of you familiar with Facebook Connect / Facebook dev, my code in the view/scripts/analyze.phtml file is as follows:
<script type="text/javascript">
var template_data = {'score': '35', 'sex': 'he'};
FB_RequireFeatures(["XFBML"], function(){
FB.init("***API KEY***", "xd_receiver.htm");
FB.CanvasClient.startTimerToSizeToContent();
FB.Connect.showFeedDialog(#######, template_data);
});
</script>
Thanks
Last edited by GarrettVD; 09-17-2009 at 04:43 AM.
Change your rewrite rule to not route .htm files to your index.php.
Thanks a lot. I am familiar with rewrite rules, but would it be possible to see an example of this type of routing?
Thanks again,
Your rewrite rule likely has a list of file extensions, separated by a pipe symbol, to not send to index.php. Probably something like
Just add htm to this list of file extensions.Code:... jpg|gif|css| ...