Default to Published

7 years 9 months ago #1 by jhummel
Default to Published was created by jhummel
I have Issue Tracker 1.6.11 installed on a Joomla 3.5.1 site. I've set the Issue Defaults to default new issues to the "Published" state in the component configuration (see attachment 1). However, the new issue form always shows "Unpublished" upon issue creation requiring users to manually change the state to Published (see attachment 2). Is this a result of some other setting I don't have configured correctly? Please advise.

Thank you
Attachments:

Please Log in or Create an account to join the conversation.

7 years 9 months ago #2 by geoffc
Replied by geoffc on topic Default to Published
Let me carry out a few tests. Usually the published state isn't displayed and then the default is definitely used, but I am wondering if there is an undocumented features at work here so want to test it out before replying, which will probably be tomorrow.

Regards
Geoff

Please Log in or Create an account to join the conversation.

7 years 9 months ago #3 by geoffc
Replied by geoffc on topic Default to Published
I can see what the problem is. [ I found a little problem displaying images in this forum where the image suffix is uppercase as well which delayed me a little. One to look at later.]

Your settings are correct.

When an issue is created in the front end usually the 'published' field is not displayed, to 'most' users, then when the issue is saved the 'default published' state gets applied.

However when an issue admin or staff member is raising an issue they are presented with the published field and it is then that the component default is not set correctly. Now to work out a fix.

Regards
Geoff
The following user(s) said Thank You: jhummel

Please Log in or Create an account to join the conversation.

7 years 9 months ago #4 by jhummel
Replied by jhummel on topic Default to Published
Thank you for looking into this. I will await your solution.

Also, I did notice the image issue in my initial post. That is good to know as I run the same forum component on my site.

Please Log in or Create an account to join the conversation.

7 years 9 months ago #5 by geoffc
Replied by geoffc on topic Default to Published
OK Here is the fix. It will be included in the next version but if you want to fix it on your own site here goes.

In the file site/components/com_issuetracker/views/form/view.html.php add the following after line 146
      $def_published = $this->state->params->get('def_published', 0);
      $this->form->setFieldAttribute('state', 'default',     $def_published);

Tested out OK on my systems.

Regards
Geoff
The following user(s) said Thank You: jhummel

Please Log in or Create an account to join the conversation.

7 years 9 months ago - 7 years 9 months ago #6 by geoffc
Replied by geoffc on topic Default to Published
There is something definitely funny about images with an uppercase suffix. I have temporarily altered the database kunena_attachments table to change the filename to lowercase and also renamed the file in the images/kunena/postid/* directory and they now display OK.

Possible something in the htaccess file although I am not convinced.

Regards
Geoff

Please Log in or Create an account to join the conversation.

Time to create page: 0.174 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries