Footable in Asp.Net MVC Https azure - footable

We use footable in a Asp.net Mvc app. It works fine when running on http.
But when we run thr same app on https from Azure it fails with the error:
(function ($, w, undefined) {
if (w.footable === undefined || w.footable === null)
throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');
Some ideas?
And what is the best practice for footable in bundles, and where to place it in the _Layout-file?

That error seems to be coming from one of the FooTable extensions (pagination, filtering, etc). The error is likely caused by one of these extensions loading before the FooTable core script itself.
What version of FooTable are you using? It seems likely that you are using V2?
If so, try including the footable.all.min.js as that includes the core footable and the base extensions in a single file

Related

API Controller Routing in .NET 6 Doesn't Work Any More

I'm trying to create a standard WebAPI project in .NET 6. I notice that the standard ApiController route doesn't have the leading api route that I like to have. When I add it, the controller breaks. It doesn't give me a 404 (not found), it just gives me that index page that says that I have to enable javascript. I'm really at a loss at what I have to do to make my app work where I can put api at the start of my routes:
[Route("api/[controller]")]
I've tried adding it to the default controller route map in different combinations. I've tried adding the UseEndpoints method in the Program class. I'm just not sure what to differently in 6.
For those who want to "see my code", I'm just using the standard WebAPI project w/ React (NO Redux!).
Check the new setupProxy.js file image description inside the ClientApp folder, you need to configure the backend routes in the proxy config, I had a similar issue with the ASP.NET Core 6.0 with Angular project template, you can find more information here link 1 link 2

The error creating app Engine's DataStore Entity within GWT app

I try to create the entity like this:
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
Entity stock = new Entity("Stock", 1);
stock.setProperty("Stock", "FCB");
ds.put(stock);
but keep getting the error:
No source code is available for type com.google.appengine.api.datastore.DatastoreService; did you forget to inherit a required module?
The error means just what it says, the GWT compiler needs access to the Java source it compiles to Javascript, and obviously DatastoreService is not something that should exist on the frontend - so you have an architecture issue here.
You'll need to write a proxy that can call a server component (Which in turns calls the DatastoreService) and returns DTOs/value objects (that you define and thus have the source for).
Cheers,
No source code is available
GWT transliterate Java to Javascript, reading it's source code and there a limited language support.
What you're trying to achieve is a Server only operation and you're adding this operation within the client code, which will run on a browser. Neither GAE allow this or GWT has the source of these classes nor capability to do so.
Solution
You need to create a request to your server that will access the DatastoreService , the return the output to the client code.
Below a example of a properly architect GWT web application:

Migrate Cakephp1.3 to 2.0

I have developed one heavily loaded project in cakephp 1.3 now my client want it in latest CakePHP version.
I have migrated it using shell script based tutorial provided on below link:
http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html
version get replaced it got migrated in CakePHP 2.0 version but now on running a project i am getting an error
Fatal error: Call to a member function parseAccept() on a non-object in D:\xampp\htdocs\arguenet1\lib\Cake\Controller\Component\RequestHandlerComponent.php on line 134
project is mostly developed with ajax functionality and requesthandler componenet also have been used to check isAjax request or not on component side.
Can anyone help me to solve this error...Thanks in advance.
The signature for the __construct() method has changed in 2.x. See the API docs here. Try modifying your AppController::__construct() like so:
public function __construct($request = null, $response = null) {
parent::__construct($request, $response);
// Your code here.
}
Credit to this Google Groups thread.

symfony/zend integration - blank screen

I need to use ZendAMF on a symfony project and I'm currently working on integrating the two.
I have a frontend app with two modules, one of which is 'gateway' - the AMF gateway. In my frontend app config, I have the following in the configure function:
// load symfony autoloading first
parent::initialize();
// Integrate Zend Framework
require_once('[MY PATH TO ZEND]\Loader.php');
spl_autoload_register(array('Zend_Loader', 'autoload'));
The executeIndex function my the gateway actions.class.php looks like this
// No Layout
$this->setLayout(false);
// Set MIME Type
$this->getResponse()->setContentType('application/x-amf; charset='.sfConfig::get('sf_charset'));
// Disable cause this is a non-html page
sfConfig::set('sf_web_debug', false);
// Create AMF Server
$server = new Zend_Amf_Server();
$server->setClass('MYCLASS');
echo $server->handle();
return sfView::NONE;
Now when I try to visit the url for the gateway module, or even the other module which was working perfectly fine until this attempt, I only see a blank screen, with not even the symfony dev bar loaded. Oddly enough, my symfony logs are not being updated as well, which suggests that Synfony is not even being 'reached'.
So presumably the error has something to do with Zend, but I have no idea how to figure out what the error could be. One thing I do know for sure is that this is not a file path error, because if I change the path in the following line (a part of frontendConfiguration as shown above), I get a Zend_Amf_Server not found error. So the path must be correct. Also if I comment out this very same line, the second module resumes to normality, and my gateway broadcasts a blank x-amf stream.
spl_autoload_register(array('Zend_Loader', 'autoload'));
Does anyone have any tips on how I could attach this problem?
Thanks
P.S. I'm currently running an older version of Zend, which is why I am using Zend_Loader instead of Zend_autoLoader (I think). But I've tried switching to the new lib, but the error still remains. So it's not a version problem as well.
got it...
I was not using
set_include_path()
while loading Zend. It's still odd that it would give such a cryptic error, but this was the missing piece indeed.

ASP .NET MVC2 problem in calling jquery.get()

I am working on a ASP .NET MVC2 project where i have to load data using $.get() but it doesn't works. Although if i call same method with $.post() even giving [AcceptVerbs(HttpVerbs.Post)] above of my controller method or not it works. So i just want to ask Does Microsft has put a restriction inn calling $.get() with ASP .NET MVC2. If yes then whats the reason behind it security or anything else.
What do you mean it doesn't work? What http status code do you get? Is there an error message? Try using firebug and open the net tab to watch the result to see any errors and to also make sure it is calling the url you are expecting. Also, have you tried using jQuery $.ajax() instead of $.get()?
Are you using .Net Framework 3.5 ?
Maybe you should consider creating an Ajax enabled WCF service,
the asp postback and autopostback model can be the reason why
it doesn't work nicely .
Firebug / fiddler is your friend