question
avatar TobsBobs
TobsBobs
9 Jan 2013

If I install the master branch then I see the following picture:

site

There is no content.

Database and sample data were successfully installed. There is unfortunately nothing appears.

I've looked but I can not found the error. :(

avatar TobsBobs TobsBobs - open - 9 Jan 2013
avatar TobsBobs TobsBobs - open - 9 Jan 2013
avatar TobsBobs TobsBobs - reference | - 9 Jan 13
avatar elkuku
elkuku - comment - 11 Jan 2013

OK, I'm still on the road with no access to a dev environment, but I think I identified the issue.

Am I correct, that yor server has short_open_tags disabled ?

This is actually one of the most controversial and emotional discussions about how to code PHP. From what I can read in blogs and mailing lists etc., there is almost a 50:50 of people who either love or hate them.

Since I belong to the group who loves them, and had the luck that my latest projects were running on servers that had those tags enabled (as by default), I deliberately used them also in this project - as long as anybody else (and the server) has no objection.

So I would like to ask the question here if that's OK with all of you (and the server that the app is supposed to run on).

As for the PHP development, it should be noted that short_open_tags are not only enabled by default in PHP 5.4, but also the option to actually disable them has been removed.

For the issue at hand, could you please confirm, that the short_open_tags are indeed disabled on you server ?
Maybe you could either enable them or change the code at https://github.com/JTracker/jissues/blob/master/components/com_tracker/view/issues/tmpl/default.php#L31

// Old
<?= JHtmlProjects::...
// New
<?php echo JHtmlProjects::...

Thanks.

avatar TobsBobs
TobsBobs - comment - 13 Jan 2013

Hello,

short_open_tags was the problem. Now everything is displayed as it should.
Thank you. ;)

avatar TobsBobs TobsBobs - close - 13 Jan 2013
avatar elkuku elkuku - reopen - 13 Jan 2013
avatar elkuku
elkuku - comment - 13 Jan 2013

Glad we sorted that out :)

But I would like to leave this open as the question remains if we should use short open tags.

Any objections ?

avatar realityking
realityking - comment - 13 Jan 2013

Small correction, short_open_tag very much still exists in 5.4. The only thing that changed is that <?= is now always available regardless of the setting of short_open_tag. So I wonder whether your question is about <? or <?= ?

avatar elkuku
elkuku - comment - 13 Jan 2013

The question is about <?= which, I believe, makes mixed HTML and PHP code much more readable.

avatar pjwiseman
pjwiseman - comment - 14 Jan 2013

If I'm interpreting correctly, shorthand form <?= is always available in PHP 5.4.0 and above therefore it can be used if we require PHP 5.4.0 or above. The use of short-open-tag is a different question. i.e. Code <?php instead of <?
The Joomla core is supported on PHP 5.3.1 therefore core development isn't free to use the shorthand form yet.
So the question becomes - do we need to restrict jissues to J3 coding standards? What's the risk of some jissues code being ported to the core and the shorthand form being missed? What's the risk of a developer working on jissues code "forgetting" that we can't use the shorthand form in Joomla core yet?
Personally, I'm ok with using the shorthand form in jissues, and live the risks.

avatar drmmr763
drmmr763 - comment - 14 Jan 2013

Personally I dislike the use of the shorthand code. I also believe we
should be consistent, it doesn't make a whole lot of sense to mix the two
"styles" in the same application.

I doubt that much of what is written application wise will be pushed to the
platform, we're not writing a libraries in the issues project (although
when it comes to packages like JGithub we might be making some useful
additions-which are restricted to the platform style).

This to me wouldn't be an issue of following the style of the platform -
it's more about being consistent and not switching randomly between the two
tags.

On Sunday, January 13, 2013, Peter Wiseman wrote:

If I'm interpreting correctly, shorthand form <?= is always available in
PHP 5.4.0 and above therefore it can be used if we require PHP 5.4.0 or
above. The use of short-open-taghttp://php.net/manual/en/ini.core.php#ini.short-open-tagis a different question. i.e. Code
<?php instead of <?
The Joomla core is supported on PHP 5.3.1 therefore core development isn't
free to use the shorthand form yet.
So the question becomes - do we need to restrict jissues to J3 coding
standards? What's the risk of some jissues code being ported to the core
and the shorthand form being missed? What's the risk of a developer working
on jissues code "forgetting" that we can't use the shorthand form in Joomla
core yet?
Personally, I'm ok with using the shorthand form in jissues, and live the
risks.


Reply to this email directly or view it on GitHubhttps://github.com/JTracker/jissues/issues/75#issuecomment-12203461.


[image: Small Logo] http://www.s-go.net/
Chad Windnagle
s-go Consulting
607-330-2574 x103
607-229-6260 (Cell)
Website Design - SEO - Video http://www.s-go.net/

Follow Me: [image: Facebook] http://www.facebook.com/sgoconsulting [image:
LinkedIn] http://www.linkedin.com/in/drmmr763 [image:
Twitter]http://www.twitter.com/drmmr763

avatar mbabker
mbabker - comment - 1 Feb 2013

For the sake of not writing more rules, I'd just rather stick with the code style rules already in place on the Platform/CMS. I know nothing's being enforced right now, but that's just my opinion on the matter; consistency across all code maintained by the project.

As for the use of short tags, no config changes have been required on my local setup or server to use them, and I'm fairly certain the same could be said about the project's servers.

avatar elkuku elkuku - close - 4 May 2013
avatar elkuku
elkuku - comment - 4 May 2013

I think we should stay with <?php echo ... ?> for now, even if PSR-1 allows the usage of <?= ... ?>...

avatar - close - 4 May 2013

Add a Comment

Login with GitHub to post a comment