My-tickets only showing most recent ticket
-
When I go to my-tickets I was under the impression that I would see a list of all tickets my user had created.
Is that how it is supposed to work?
Each time I create a new ticket, only the most recent ticket displays on the “my-tickets” page.
Any ideas how to fix this? Thanks.
-
Are you talking about the front-end page? If so, a user is supposed to see the list of all the tickets he/she has created.
Yeah, the front-end page.
And yes, I imagined it should show the list of all the tickets I’ve created, but it only shows one ticket at a time, and only the most recent.
When I create a new ticket, only the most recent shows. Only 1 ticket at a time.
I’m using a very simple customization of the _s theme
I had success recently customizing the ticket page with a single-ticket.php page. Does awesome support recommend making another page template specifically for the “my-ticket” and “submit-ticket” pages too? Is that option available?
So I’ve discovered there’s a plugin conflict–it’s not an optional one for me either ??
Do you want to take a stab at it first, or should I go to the other guys?
Thanks,
What is the conflicting plugin?
It’s a premium plugin – drag and drop page builder: LiveComposer.
https://codecanyon.net/item/live-composer-frontend-wordpress-page-builder/6594028
https://livecomposerplugin.com/At first I thought it was just the content module was doing something strange with echoing the content, but later discovered that awesome support only displays a list of tickets when livecomposer is deactivated completely.
Is Awesome Support pulling from /themes/default/list.php to create the my-tickets page?
Absolutely.
list.php
is the template that’s used to display a user’s tickets. It is quite strange that LC messes up with the list as it uses a customWP_Query
. Could you possibly have the developer get in touch with us so that we can work together on identifying the problem.K, I reached out to him.
I’ll probably buy an addon or too if we can figure this out. Let me know if I can donate or buy you a cup of coffee or something.
Thanks,
LC hooks into the_content filter, so I think that’s where this issue happens. There’s a bunch of checks in there to make sure only main content output gets filtered, nothing else.
Jacob, the FTP info I have from back in the start of April takes to an empty folder, could you send over the new FTP and WP admin info to my email and I’ll dig in there and see what’s happening.
Regards,
SlobodanHi Slobodan, thanks for dropping by.
On our side, what Awesome Support does is also hook into
the_content
. The strange thing is that only one ticket is displayed. The tickets are retrieved by a customWP_Query
that’s stored in a global variable$wpas_tickets
.Hi,
The issue with the amount of tickets is sorted out now. Was caused by LC, we’re hooking into pre_get_posts to alter the amount of posts in the main WP query on author archives page ( when the author archive is LC Powered ) but was not specific enough with the conditionals so it affected that listing as well.
———————-
As for the second thing, about the single ticket page.
Both the support plugin and LC hook into the_content filter to display their content, since that allows to either put content before the current one, after the current one or completely replace the current one, the ticket output can not go between the header and footer, since the header and footer are LC powered and come from the_content filter.
A solution would be a shortcode for displaying a ticket, that way it can be called in the main area ( between header and footer ) using a text/html module.
Regards,
SlobodanJulien,
I don’t think awesome support displays the single ticket page with a shortcode.
Is this possible?
I wonder if there’s a way to edit single-ticket.php to make this work?
Any thoughts?
Thank you both for taking such a good look at this.
Many thanks for fixing that Slobodan. I appreciate you coming here to help.
Jacob, it is not possible to use a shortcode to display a single ticket. The reason is that there is no one page to display all individual tickets. Tickets are a post type, which means that individual tickets aren’t displayed by a page, but by a post type single template.
What you could potentially do is create a new template in your theme that you’ll call
single-ticket.php
and use the functionwpas_single_ticket( '' )
instead ofthe_content()
to display the ticket content.Julien,
Got your email before you edited your response ??
Thanks for the shortcode snippet.
So, because I’m using Live Composer, it obviates the need for a specific template like single-ticket.php–I can create my own templates for different post types using Live Composer.
The short code actually works because of the way Live Composer operates.
However, I do have one remaining problem. If you don’t mind looking at the screenshot I’m posting here, it will show you what’s going on:
https://tingenwilliams.com/wp-content/uploads/2015/04/Screen-Shot-2015-04-29-at-10.32.47-AM.png
Because both Live Composer, and the single ticket view of Awesome Support hook into the_content like Slobodan mentioned before, it’s echoing the awesome support content, then the live composer content inside the first ticket post. Because I’m using a shortcode inside the LC content, it’s echoing all the tickets the way I would like it to work.
Any ideas how to iron out this final wrinkle?
Thank you both.
Alright then, that’s good you got the snippet! As you confirm it is working I’m re-adding it here in case someone else encounters the same problem.
add_shortcode( 'ticket', 'wpas_single_ticket_shortcode' ); /** * Single ticket details shortcode. * * @return string The ticket details page */ function wpas_single_ticket_shortcode() { return wpas_single_ticket( '' ); }
This will create the shordcode
[ticket]
that can be used with Live Composer.Now, if you use this shortcode to display the ticket content, you’ll need to remove the hook on
the_content
to avoid having it displayed twice. Just add the following to your theme’sfunctions.php
:remove_filter( 'the_content', 'wpas_single_ticket', 10, 1 );
Works great.
Thanks so much to both of you. Seriously, the best support experience from plugin authors I’ve ever had since I began using WordPress in 2007.
Julien, I’ll rate Awesome Support here on www.ads-software.com. Is there anywhere else you would like me to give a testimonial or rating?
Thanks so much.
- The topic ‘My-tickets only showing most recent ticket’ is closed to new replies.