Signature Once

Signature Once 2.0.8

No permission to download
@batpool52! I am getting this Server error log.

Code:
TypeError: Argument 1 passed to TickTackk\SignatureOnce\XF\Repository\Post::setShowSignature() must implement interface TickTackk\SignatureOnce\Entity\ContainerInterface, null given, called in /home/nadda/public_html/src/addons/TickTackk/SignatureOnce/ControllerPlugin/Container.php on line 37 src/addons/TickTackk/SignatureOnce/Repository/ContentTrait.php:26

Generated by: Unknown account Mar 24, 2019 at 2:25 AM

Stack trace

#0 src/addons/TickTackk/SignatureOnce/ControllerPlugin/Container.php(37): TickTackk\SignatureOnce\XF\Repository\Post->setShowSignature(NULL, NULL, 1)
#1 src/addons/TickTackk/SignatureOnce/XF/Pub/Controller/Thread.php(36): TickTackk\SignatureOnce\ControllerPlugin\Container->setShowSignature(Object(XF\Mvc\Reply\View), 'thread', 'posts', 1, 'XF:Post')
#2 src/addons/SV/ElasticSearchEssentials/XF/Pub/Controller/Thread.php(23): TickTackk\SignatureOnce\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(321): SV\ElasticSearchEssentials\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#5 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ElasticSearchEssentials\XF\Pub\Controller\Thread), NULL)
#6 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#8 src/XF.php(390): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state

array(4) {
  ["url"] => string(15) "/threads/58051/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
  • Sad
Reactions: CNK
Hi @batpool52!
I was wondering if this is possible, would it be possible to hide all signatures by default, but have a link saying "View Signature" in the signature area?
 
@batpool52! This does not work for Thread starter post. Thread starter Signature will be showing in all post and page. Also this Signature not working for all page, some page work but some page does not work.
 
This add-on is very great and is working fine in my live (big) Forum.

Could i make a suggestion, perhaps?

Instead of hiding the signature in all the thread, maybe the users should have a option in the action bar: "show signature".

This is useful for very big threads (i have some threads with more than 6k pages) and sometimes, the user want to see whats is hiding behind the signature.

Thank you batpool! Keep the great work.
 
This add-on is very great and is working fine in my live (big) Forum.

Could i make a suggestion, perhaps?

Instead of hiding the signature in all the thread, maybe the users should have a option in the action bar: "show signature".

This is useful for very big threads (i have some threads with more than 6k pages) and sometimes, the user want to see whats is hiding behind the signature.

Thank you batpool! Keep the great work.
Do you have it set to show signatures once per thread, or once per page? Big difference.
 
Do you have it set to show signatures once per thread, or once per page? Big difference.

Once per thread.

I didn't tested the once per page version.

But is just a suggestion for improving the add-on, more like a administrative choice for each board owner.
 
Do you have the link?
Not handy but I will hunt it down for you. Saw that thread bumped awhile back.

This Mod doesn't have all the queries the one you're asking for does, that one still calls all sigs up but then hides them with j/s. This mod saves queries and really makes the threads look tidy.
 
Hi, I wanted to report a performance issue with this add-on. When we have Signature Once enabled, our largest threads stall out, big time, when loading from the main thread URL (without a page number or post count to start from). It seems this statement is taking the longest:


Code:
# Query_time: 136.476312  Lock_time: 0.000034  Rows_sent: 20  Rows_examined: 7170565
# Rows_affected: 0  Bytes_sent: 389
SET timestamp=1576964217;
SELECT
                post_main.post_id,
                (
                  SELECT post_id
                  FROM xf_post AS post_tmp
                  WHERE post_tmp.user_id = post_main.user_id
                    AND post_tmp.position >= 0
                    AND post_tmp.position < post_main.position
                    AND post_tmp.thread_id = 15480
                    AND post_tmp.message_state IN ('visible', 'deleted', 'moderated')
                  ORDER BY post_tmp.post_id ASC
                  LIMIT 1
                ) AS previous_post_id
            FROM
            (
                SELECT DISTINCT user_id, post_id, position
                FROM xf_post AS post
                WHERE post.thread_id = 15480
                  AND post.message_state IN ('visible', 'deleted', 'moderated')
                  AND post.position >= 0
                  AND post.position < 20
            ) AS post_main;

It seems like the code is trying to pull every single post in the thread, instead of just the 1st page. Is it possible to make this more efficient? As of right now, we're seeing people complain the pages stop responding for them for up to 2 minutes any time they try to load these larger threads. And, naturally, these larger threads are some of the more popular ones, so multiple queries like this can bring our forum down entirely.
 
What's the post count on that thread? There was a similar issue early this year and it turned out to be server misconfiguration. Please read here on what caused the issue.
 
I believe that one is around 3,700, but we are seeing slowdowns on threads with as few as 1,500.

Our innodb_buffer_pool_size is set to 1GB. That's about as much as we can afford to allocate - any more than that and our server becomes unstable. I even tried just 100MB more and services started going down on our server.

Repeated calls of the same thread do not really speed it up much, either. Even after refreshing that thread maybe 100 times today, it's still taking 30-60 seconds or so, depending on how many other people are on the site.
 
This is the result of thread with 6K posts for me:
Code:
            SELECT
                post_main.post_id,
                (
                  SELECT post_id
                  FROM xf_post AS post_tmp
                  WHERE post_tmp.user_id = post_main.user_id
                    AND post_tmp.position >= 0
                    AND post_tmp.position < post_main.position
                    AND post_tmp.thread_id = 432
                    AND post_tmp.message_state IN ('visible', 'deleted', 'moderated')
                  ORDER BY post_tmp.post_id ASC
                  LIMIT 1
                ) AS previous_post_id
            FROM
            (
                SELECT DISTINCT user_id, post_id, position
                FROM xf_post AS post
                WHERE post.thread_id = 432
                  AND post.message_state IN ('visible', 'deleted', 'moderated')
                  AND post.position >= 0
                  AND post.position < 20
            ) AS post_main

Run Time: 0.000163

Please run the following query and show the results:
Code:
EXPLAIN SELECT
                post_main.post_id,
                (
                  SELECT post_id
                  FROM xf_post AS post_tmp
                  WHERE post_tmp.user_id = post_main.user_id
                    AND post_tmp.position >= 0
                    AND post_tmp.position < post_main.position
                    AND post_tmp.thread_id = 15480
                    AND post_tmp.message_state IN ('visible', 'deleted', 'moderated')
                  ORDER BY post_tmp.post_id ASC
                  LIMIT 1
                ) AS previous_post_id
            FROM
            (
                SELECT DISTINCT user_id, post_id, position
                FROM xf_post AS post
                WHERE post.thread_id = 15480
                  AND post.message_state IN ('visible', 'deleted', 'moderated')
                  AND post.position >= 0
                  AND post.position < 20
            ) AS post_main
 
Last edited:
OK, here is the result:


Code:
+------+--------------------+------------+-------+------------------------------------------------+--------------------+---------+-------------------+------+------------------------------------+
| id   | select_type        | table      | type  | possible_keys                                  | key                | key_len | ref               | rows | Extra                              |
+------+--------------------+------------+-------+------------------------------------------------+--------------------+---------+-------------------+------+------------------------------------+
|    1 | PRIMARY            | <derived3> | ALL   | NULL                                           | NULL               | NULL    | NULL              |   15 |                                    |
|    3 | DERIVED            | post       | range | thread_id_post_date,thread_id_position         | thread_id_position | 8       | NULL              |   20 | Using index condition; Using where |
|    2 | DEPENDENT SUBQUERY | post_tmp   | ref   | thread_id_post_date,thread_id_position,user_id | user_id            | 4       | post_main.user_id |  971 | Using where                        |
+------+--------------------+------------+-------+------------------------------------------------+--------------------+---------+-------------------+------+------------------------------------+
3 rows in set (0.001 sec)
 
Back
Top Bottom