Page 1 of 1

Titanium Application with CMSMS Udt

Posted: Tue Feb 17, 2015 9:36 am
by Superpink
Hi,

I'm developing a mobile application with Appcelerator Titanium.

In parallels, I have a blog with a contest where people can vote. In my application, I use a simple javascript call to a page with empty template and a UDT inside.

For example, my call is :

http://www.mywebsite/setNewVote.html (CMSMS page)

My UDT is simple for the moment, just return $_POST.

The problem is that nothing is return in my application.


It's not a problem from my application because I created a simple PHP script on the server root with same code of my UDT (return $_POST) and it returns my array as expected.

I also tried wi a showtemplate=false.

Can you help me please ?

Re: Titanium Application with CMSMS Udt

Posted: Tue Feb 17, 2015 12:23 pm
by velden
Make sure that the request is not redirected first (.htaccess rewrite rule?)

Re: Titanium Application with CMSMS Udt

Posted: Tue Feb 17, 2015 12:41 pm
by Superpink
This is the htaccess :

Code: Select all

Options +FollowSymLinks 
RewriteEngine on 
RewriteBase /dev/pointcarre

RewriteCond %{REQUEST_URI} !/$ 
RewriteCond %{REQUEST_URI} !\. 
RewriteCond %{REQUEST_METHOD} !POST$ 
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+).html$ index.php?page=$1 [QSA]
I tried to give the URL without url rewriting. I also tried to remove the second block of this htaccess.

Return is empty.

Re: Titanium Application with CMSMS Udt

Posted: Tue Feb 17, 2015 1:24 pm
by velden
I hope you don't expect a real php array to be returned from cmsms?

Maybe you want to post the code of the UDT, and the template plus content of the cmsms page.