Welcome Guest, Not a member yet? Register   Sign In
Urgent! Web made with CI is not being displayed in mobile devices
#1

[eluser]luismartin[/eluser]
I need your help to find out why this web is not being displayed in mobile devices (iPad, iPhone, Android, Blackberry etc):

http://www.sonia-sa.com

A blank page is displayed instead in iPhone/iPad. It works fine in common browsers (FF, Chrome, IE, Opera...)

I've already done some tests such as commenting out all the CSS and JS links and inline code. In this case I also get a blank page, so it's not due to CSS/JS. The Blackberry displays a 500 status error. I've tried to serve the index page as a plain html copied and pasted from the resulting home page and this is being correctly displayed in iPhone. So I think I can definitely discard any doctype, html, js, or css error.

My suspicions now are on PHP/Codegniter and Apache.

Is there anything I must do in CodeIgniter in order to allow a web to be viewed in mobile devices? If not, I would really appreciate any suggestion.
#2

[eluser]Aken[/eluser]
There has to be some code that is specifically targeting mobile devices, causing them not to work. Look through your code.
#3

[eluser]WanWizard[/eluser]
It's either an issue with your server or with your code, as the blank page comes with a HTTP/500 INTERNAL SERVER ERROR.

This happens for example if you're rewrite rules are not correct. Do you have any platform specific setup?
#4

[eluser]luismartin[/eluser]
Hello Aken and Wan. Thanks for your quick replies.

Aken: I didn't implement myself anything to prevent the web from being displayed in mobile devices, as long as there is anything I must specifically do in CI to allow them to work.

Wan: The following are the CI routes, and next the .htaccess rewrite rules:

Code:
$route['default_controller'] = 'home';
$route['404_override'] = 'error_404';

// Pagination routing in backend
$route['admin/(series|productos|acabados|articulos|usuarios)/([0-9]+)'] = 'admin/$1/index/$2';

$route['((\w{2}/)?)ideas-and-trends'] = 'ideastrends';
$route['((\w{2}/)?)ideas-and-trends/(.*)'] = 'ideastrends/index/$3';

$route['((\w{2}/)?)serie/(.*)'] = 'serie/index/$3';
$route['((\w{2}/)?)producto/relacionados/(.*)'] = 'producto/relacionados/$3';
$route['((\w{2}/)?)producto/(especificaciones|instrucciones|relacionados|descargas|descargar)/(.*)'] = 'producto/$3/$4';
$route['((\w{2}/)?)producto/(.*)'] = 'producto/index/$3';
$route['((\w{2}/)?)catalogos/(.*)'] = 'catalogos/index/$3';
$route['((\w{2}/)?)proyectos-realizados/(.*)'] = 'proyectosrealizados/index/$3';
$route['((\w{2}/)?)ideastrends/(.*)'] = 'ideastrends/index/$3';
$route['((\w{2}/)?)contract-m2o/(.*)'] = 'm2o/index/$3';
$route['((\w{2}/)?)innovacion/(.*)'] = 'innovacion/index/$3';
$route['((\w{2}/)?)buscar/(.*)'] = 'buscar/index/$3';

// These more generic rules go next so that they dont interfere with routes like "proyectos-realizados"
$route['(\w{2})/([a-zA-Z0-9_]*)-(.*)'] = '$2$3'; // Removes controller dash for a route with language
$route['([a-zA-Z0-9_]*)-(.*)'] = '$1$2'; // Removes controller dash
$route['(admin/[a-zA-Z0-9_]*)-(.*)'] = '$1$2'; // Removes controller dash in backend

$route['(\w{2})/(.*)'] = '$2';
$route['(\w{2})'] = $route['default_controller'];

Code:
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteRule ^(es|en|fr|de|it|ru|us)/(css|js|images|assets|scripts|ckeditor|robots.txt)(.*) $2$3  [L]
RewriteRule ^(es|en|fr|de|it|ru|us)/(.*) $2?lang=$1 [L]

RewriteCond $1 !^(index.php|css|js|images|assets|scripts|ckeditor|robots.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

I know the routes file is kind of messy and it could be done with fewer lines, but I will tidy it up as soon as possible.
#5

[eluser]InsiteFX[/eluser]
Search for media queries or 1140 grid that does mobile

#6

[eluser]luismartin[/eluser]
[quote author="InsiteFX" date="1331076158"]Search for media queries or 1140 grid that does mobile

[/quote]

I'm not sure what you mean with media queries and 1140 grid...
#7

[eluser]Aken[/eluser]
Something on your website is set up improperly. I don't think we can really help you further without having access to your entire application.

Start by removing things bit by bit until something changes, or inversely, start from scratch and start adding things from basic to complicated and see where things change/improve.
#8

[eluser]pbflash[/eluser]
Have you checked your server error logs to see what is causing the 500 error?
#9

[eluser]InsiteFX[/eluser]
1140 grid framework

The 1140 grid fits perfectly into a 1280 monitor. On smaller monitors it becomes fluid and adapts to the width of the browser.

Beyond a certain point it uses media queries to serve up a mobile version, which essentially stacks all the columns on top of each other so the flow of information still makes sense.

Scrap 1024! Design once at 1140 for 1280, and with very little extra work, it will adapt itself to work on just about any monitor, even mobile.
#10

[eluser]luismartin[/eluser]
Hello again,

the error log is not saying anything wrong. I've changed the log mode to debug mode, restarted Apache, and tried to access from an iPhone:


Code:
[Wed Mar 07 10:28:40 2012] [info] Init: Seeding PRNG with 648 bytes of entropy
[Wed Mar 07 10:28:40 2012] [info] Init: Wiped out the queried pass phrases from memory
[Wed Mar 07 10:28:40 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Wed Mar 07 10:28:40 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Wed Mar 07 10:28:40 2012] [info] Init: Initializing (virtual) servers for SSL
[Wed Mar 07 10:28:40 2012] [info] mod_ssl/2.2.14 compiled against Server: Apache/2.2.14, Library: OpenSSL/0.9.8k
[Wed Mar 07 10:28:40 2012] [info] Init: Seeding PRNG with 648 bytes of entropy
[Wed Mar 07 10:28:40 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Wed Mar 07 10:28:40 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(253): shmcb_init allocated 512000 bytes of shared memory
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(272): for 511952 bytes (512000 including header), recommending 32 subcaches, 133 indexes each
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(306): shmcb_init_memory choices follow
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(308): subcache_num = 32
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(310): subcache_size = 15996
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(312): subcache_data_offset = 2144
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(314): subcache_data_size = 13852
[Wed Mar 07 10:28:40 2012] [debug] ssl_scache_shmcb.c(316): index_num = 133
[Wed Mar 07 10:28:40 2012] [info] Shared memory session cache initialised
[Wed Mar 07 10:28:40 2012] [info] Init: Initializing (virtual) servers for SSL
[Wed Mar 07 10:28:40 2012] [info] mod_ssl/2.2.14 compiled against Server: Apache/2.2.14, Library: OpenSSL/0.9.8k
[Wed Mar 07 10:28:40 2012] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.9 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k configured -- resuming normal operations
[Wed Mar 07 10:28:40 2012] [info] Server built: Nov 18 2010 21:17:19
[Wed Mar 07 10:28:40 2012] [debug] prefork.c(1013): AcceptMutex: sysvsem (default: sysvsem)

A question: since this domain www.sonia-sa.com was previously assigned to another internal IP, and we created a new virtualhost in order to re-assign this domain to a new IP (the location of the new web), I'd like to know whether this might be a reason why it is failing.

Do you by chance get a redirection from
www.sonia-sa.com
to
www.sonia-sa.com/websonia/jsp-sonia/index.jsp ?

the old web was made with jsp and redirected to this path.




Theme © iAndrew 2016 - Forum software by © MyBB