1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

One styles code is merging with another.

Discussion in 'Troubleshooting and Problems' started by TazDevilLooney, Sep 5, 2011.

  1. TazDevilLooney

    TazDevilLooney Active Member

    I'm not sure how this is happing but only seems to happen on one page that i have noticed.
    If selecting "What's New" and the content is empty i get code implanted from a separate style.

    I have cleared all cache to no avail.

    *Eloquent Blue*
    style1.png

    This code does not exist in the style but is present.

    style2.png

    The code is coming from this style.

    *Wizkid Style*
    style3.png

    style5.png

    Edit : Happens though out all styles install even the default. I have created a new default style and the problem is still there.

    style11.png

    style10.png

    Any ideas guys? o_O
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You do have a lot of styles which can cause problems with rebuilding the cache following template changes. You can try getting rid of some styles. But if this is a problem then you should have noticed an error on saving templates.

    Since the problem also happens in the default style this might be a problem with the master. You can import the master again by visiting /install/ and clicking Rebuild Master Data.
     
  3. Mike

    Mike XenForo Developer Staff Member

    I was going to suggest that it sounds like the master has been edited.
     
  4. TazDevilLooney

    TazDevilLooney Active Member



    I have no idear how. :eek:

    I ran the "Rebuild Master Data" and created a new style but the problem persists. I'm in the process of uninstalling all the add-ons to try the rebuild again.
     
  5. TazDevilLooney

    TazDevilLooney Active Member

    After transfering my hole site to a test computer i started to uninstall all the addons. When the addons was uninstalled i took another look at the default style and there was no change. I then proceded to "Rebuild Master Data" again which was successfull. I then went to create a new style and i got this message "An unexpected database error occurred. Please try again later" i ran it twice with the same result.

    x1.png

    Checked all server logs mysql, apache, php and in Admin's CP and no errors are logged.
    The file health check is ok

    Luckily this is on a test computer but will yeld the same results on my live site.

    I then proceeded to uninstall the styles. All was going fine till i got to Flexile with the 5 child styles. I received this error....

    ----------------------------------------------------------------------------------------

    Admin Control Panel - Fix It WizKid - Free computer support forum and chat.
    Server Error

    Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction

    Zend_Db_Statement_Mysqli->_execute() in \library\Zend\Db\Statement.php at line 297
    Zend_Db_Statement->execute() in \library\Zend\Db\Adapter\Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in \library\Zend\Db\Adapter\Abstract.php at line 661
    Zend_Db_Adapter_Abstract->delete() in \library\XenForo\DataWriter.php at line 1690
    XenForo_DataWriter->_delete() in \library\XenForo\DataWriter.php at line 1644
    XenForo_DataWriter->delete() in \library\XenForo\ControllerAdmin\Style.php at line 114
    XenForo_ControllerAdmin_Style->actionDelete() in \library\XenForo\FrontController.php at line 310
    XenForo_FrontController->dispatch() in \library\XenForo\FrontController.php at line 132
    XenForo_FrontController->run() in \admin.php at line 13

    ------------------------------------------------------------------------------------------

    The main style was removed but left the child's behind. I don't know if this is correct or not.

    x2.png

    Advice anyone on how to fix the default style...... I think i broke it, hopefully Mike and Kier can save the day. :rolleyes:
     
  6. Mike

    Mike XenForo Developer Staff Member

    Rebuild Master Data will make sure that everything is ok with the cached data.

    I suppose another option would be a modified phrase - that could definitely be it. (Adding the HTML to the phrase.)
     
    Brogan likes this.
  7. TazDevilLooney

    TazDevilLooney Active Member

    Thanks for the reply Mike but i'm lost...... Any instructions for dummy's? :whistle:

    Arr i just twigged what you was on about. I'll check.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Check the no_unread_threads_view_recent phrase.

    It should be this: You have no unread threads. You may <a href="{link}">view all recent threads</a> instead.
     
    TazDevilLooney likes this.
  9. TazDevilLooney

    TazDevilLooney Active Member

    Bingo..... I can't even remember doing that. :eek:

    Code:
    <div>
    <div class="tcatb3">
    <div class="tcatbRight3">
    <div class="tcatbLeft3">
    </div></div></div>
    <div class="little-blue2"></div>
    <div class="lukes2" style="padding:10px;border-left:2px solid #8b8b8b;border-right:2px solid #8b8b8b;">
    <div style="*padding-bottom:10px;_padding-bottom:10px;">You have no unread threads. You may <a href="{link}">view all recent threads</a> instead.</div></div>
    <div style="*margin-top:-10px;">
    <div class="little-blue2"></div>
    <div style="_margin-bottom:-11px;"></div>
    <div class="tcatb3-180">
    <div class="tcatbRight3-180">
    <div class="tcatbLeft3-180">
    </div></div></div>
    </div>
    </div>
    Would this of caused the other event's too?
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Events?

    Do you mean the errors when uninstalling the styles?

    No, that's unrelated and is just to do with having a lot of styles.
     
  11. TazDevilLooney

    TazDevilLooney Active Member

    Ok, i had another 15 to add but i guess i best hold off on that then.

    On another note while on the subject of styles.
    I did notice that on quite a few occasions it times out updating the child styles from the main one. Brings up an error as it took over 30 seconds to complete. I'm running an SSD, 2.8 quad processor and i'm on a local network and still can't seem to make it. Is there anyway of extending this. The server is on a default 300 seconds.

    Also if i ever do uninstall all my add-ons i won't be able to create a new default style. Now if this was because i keeped running the "Rebuild Master Data" i could not tell but this confuses me more than anything.
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    When I was poking around your forum last night I found this problem also happens when there are empty search results. If the code is in your phrases then that means you need to check the no_results_found phrase too. In fact, just search all phrases for "lukes2" to make sure you find all of them.
     
  13. TazDevilLooney

    TazDevilLooney Active Member

    Thanks jake i will. I must of emplanted them in the early beta days and forgot about it. Did not notice till i added some extra styles to the forum. :whistle:
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is a server limit. If you have root access to the server then you can edit the my.cnf file (usually at /etc/my.cnf) to increase the value of innodb_lock_wait_timeout. Increasing that limit should avoid this error.

    What is the exact error message? It should be in your logs:

    Admin CP -> Tools -> Server Error Log

    The error message will indicate where that 30 second limit is coming from. It is probably PHP's max_execution_time setting.
     
  15. TazDevilLooney

    TazDevilLooney Active Member

    Thanks Jake, The exact error message i don't have available. It was a 30 seconds limit. I will check both locations you have described and get back to you. (y)
     
  16. TazDevilLooney

    TazDevilLooney Active Member

    I have updated

    max_execution_time = 300
    innodb_lock_wait_timeout = 300
    mysql.connect_timeout = 300

    I now get this error after 30 seconds.

    er1.png

    This only happens when i make an update to Eloquent Gray or Flexile Blue and they update the child's. The single styles save fine. What does it take to get past 30 seconds. :D

    Nothing in the logs. What could i of missed?
     
  17. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Ok that is the javascript timeout from this file:

    js/xenforo/xenforo.js

    Code:
    			var ajaxOptions = $.extend(true,
    			{
    				data: data,
    				url: url,
    				success: success,
    				type: 'POST',
    				dataType: 'json',
    				error: function(xhr, textStatus, errorThrown)
    				{
    					try
    					{
    						// attempt to pass off to success, if we can decode JSON from the response
    						success.call(null, $.parseJSON(xhr.responseText), textStatus);
    					}
    					catch (e)
    					{
    						// not valid JSON, trigger server error handler
    						XenForo.handleServerError(xhr, textStatus, errorThrown);
    					}
    				},
    				timeout: 30000 // 30s
    			}, options);
    
    You can edit that file to increase the timeout. Then refresh the Admin CP to make sure you have the latest javascript. That might fix your problem.
     
    TazDevilLooney likes this.
  18. TazDevilLooney

    TazDevilLooney Active Member

    Thanks Jake that nailed it.
    timeout: 300000 // 300s

    Eloquent Gray + 3 child's : 32 seconds
    Flexile Blue + 5 child's : 58 seconds

    Good man (y)
     
  19. TazDevilLooney

    TazDevilLooney Active Member

    Does anyone know were the timeout is in 1.1.0 ? Im unable to update some of my styles. I can't find it in the xeforo.js file were it was in 1.0.4 originally :(

    View attachment 18376
     
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Search the file for "3E4". That is 30000 minified. The js is minified in 1.1.
     
    TazDevilLooney likes this.

Share This Page