Developer Tools

That's cool. It's overall making my life easier, so I will continue to use it.

Hopefully I can get some less anecdotal feedback about the performance. I'm hoping when I install it on this PC it will run fine, though, so in that case I will reformat my laptop :p
 
If it is slow because of the other computer it would most likely be the configuration... something limiting how fast it is allowed to process stuff. Or could be a bug somewhere.
 
Just installing on my better machine. This happens after Rebuilding Caches begins...

Code:
An exception occurred: file_get_contents(http://localhost/templatesync.php?admin=1) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in C:\wamp\www\xenforo\library\DevTools\Listen.php on line 23
 
XenForo_Application::handlePhpError()
file_get_contents() in DevTools/Listen.php at line 23
DevTools_Listen::load_class_model()
call_user_func_array() in XenForo/CodeEvent.php at line 54
XenForo_CodeEvent::fire() in XenForo/Application.php at line 376
XenForo_Application::resolveDynamicClass() in XenForo/Route/Prefix.php at line 83
XenForo_Route_Prefix->_loadAndRunSubRule() in XenForo/Route/Prefix.php at line 66
XenForo_Route_Prefix->match() in XenForo/Router.php at line 61
XenForo_Router->match() in XenForo/Dependencies/Admin.php at line 68
XenForo_Dependencies_Admin->route() in XenForo/FrontController.php at line 261
XenForo_FrontController->route() in XenForo/FrontController.php at line 128
XenForo_FrontController->run() in C:/wamp/www/xenforo/admin.php at line 13

Now XenForo is completely dead as each page it is giving the same error. There probably needs to be some sort of error checking there to prevent that.

I now need to use PHP My Admin to disable the add-on :p

Sorry :(
 
I know it's an alpha. I'm testing your alpha and just feeding back stuff.


I know that too :p But it was easier to refer to it as a cache in the context of me telling you I have no solution - caching or otherwise - in place.



That's not what I meant, but I can see why you thought that.

I know it's for development only. I'm using it in that context, and there was a short period of time last night where I stopped to wonder why the add-on I'm working on suddenly started taking three times longer to load. Turns out, it wasn't my add-on at all and the delay is caused by the Dev Tools add-on and the delay is around 2-3 seconds on every single XenForo page.

Please don't take offence to what I'm saying - I've said loads of times the add-on is fantastic whether it be a 2ms delay or a 10 second delay on each page load. It works and I like it.

I'm just telling you my current experience. It may well be that the problem is my end, but at least if someone else says the same thing you will have something to go on.

Also the problem only happens when your add-on is the only one enabled still a 2 - 3 second increase on page load times (according to the debug mode output in the footer).

I'm on a different PC today. I will install the dev tools here and report back.

EDIT: For anyone considering trying this: PLEASE DO. It is actually a stroke of genius. (y)

Could you make a callgrind report with xdebug and share it with us (ie. turn on reporting)? That'll help narrow down what's causing the slowdown.
 
Just installing on my better machine. This happens after Rebuilding Caches begins...

Code:
An exception occurred: file_get_contents(http://localhost/templatesync.php?admin=1) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in C:\wamp\www\xenforo\library\DevTools\Listen.php on line 23
 
XenForo_Application::handlePhpError()
file_get_contents() in DevTools/Listen.php at line 23
DevTools_Listen::load_class_model()
call_user_func_array() in XenForo/CodeEvent.php at line 54
XenForo_CodeEvent::fire() in XenForo/Application.php at line 376
XenForo_Application::resolveDynamicClass() in XenForo/Route/Prefix.php at line 83
XenForo_Route_Prefix->_loadAndRunSubRule() in XenForo/Route/Prefix.php at line 66
XenForo_Route_Prefix->match() in XenForo/Router.php at line 61
XenForo_Router->match() in XenForo/Dependencies/Admin.php at line 68
XenForo_Dependencies_Admin->route() in XenForo/FrontController.php at line 261
XenForo_FrontController->route() in XenForo/FrontController.php at line 128
XenForo_FrontController->run() in C:/wamp/www/xenforo/admin.php at line 13

Now XenForo is completely dead as each page it is giving the same error. There probably needs to be some sort of error checking there to prevent that.

I now need to use PHP My Admin to disable the add-on :p

Sorry :(

What's the error in your Tools > Error Log?
 
I sorted it but I had to comment out line 23 in Listen.php and uninstall and reinstall.
 
I commented line 23 to disable the add-on. This enabled me to uninstall. I then uncommented the line and reinstalled and everything worked fine.

The only error in the log was the one I posted above, but as I managed to get it working I wasn't too fussed :p

I've installed it on a couple of machines since then and no problems.
 
All is going well. I haven't tested it properly on my better (work) machine due to time, but as I've said before it still saves me time compared to normal methods. I will test it properly though.

I have found another bug guys...

If you install an add-on with your add-on enabled then the new add-on doesn't have its templates installed. It's no big deal right now, I just have to remember to disable your add-on before installing a new one, and then re-enable yours after.
 
Yeah that is known and should be in that TODO file I think. It's a quick thing to fix but I just had to get things working for me and get back to work properly.
 
This has been updated. Now handles errors better. Lots of refactoring. And newly added phrases on the file system to edit and rename the same as templates. With phrasename.global.txt for phrases with the global flag.

This is the last of my updates for a while as I need to get into the Media Gallery now that this is ready. Oh and it will probably only work on linux. Naatan will fix any issues in those areas when he gets a chance.
 
Thanks Robbo et al for this, toying with it now on a WIMP env. On install, the template and phrase files all seemed to create successfully. However, the site isn't updated to reflect changes to template files.

There are a few loose ends I'm trying to get to the bottom of if anyone has any clues.
  • frontControllerPreDispatch exists in Listener, but there is no code event listener for this?
    • if I set one up, the curl to filesync.php getFileName thows "ErrorException: Undefined index: id - library\DevTools\File\Template.php:250" for every template.
Code:
#1 D:\XenForo\src\public_html\library\DevTools\File\Abstract.php(329): DevTools_File_Template->getFileName(Array)
#2 D:\XenForo\src\public_html\library\DevTools\File\Template.php(84): DevTools_File_Abstract->assertNoDwErrors(Object(XenForo_DataWriter_AdminTemplate), 'save', 'Admin Template')
#3 D:\XenForo\src\public_html\library\DevTools\File\Template\Admin.php(31): DevTools_File_Template->_updateTemplateDb(-1)
#4 D:\XenForo\src\public_html\library\DevTools\File\Template.php(151): DevTools_File_Template_Admin->_updateDb()
#5 D:\XenForo\src\public_html\library\DevTools\File\Abstract.php(131): DevTools_File_Template->_updateFileInDb()
#6 D:\XenForo\src\public_html\library\DevTools\File\Abstract.php(115): DevTools_File_Abstract->detectFileChanged()
#7 D:\XenForo\src\public_html\library\DevTools\Model\File.php(165): DevTools_File_Abstract->detectChangesAndUpdate()
#8 D:\XenForo\src\public_html\filesync.php(23): DevTools_Model_File->syncTemplates('DevTools_File_T...', -1)
    • changing "id" to "template_id" appeases getFileName, but I'm guessing that it's already within an error handler so something's already gone wrong. Will be digging deeper here now.
  • browsing to templatesync.php directly throws:
Code:
An exception occurred: Invalid model 'DevTools_Model_TemplateFile' specified in D:\XenForo\src\public_html\library\XenForo\Model.php on line 192
#0 D:\XenForo\src\public_html\library\DevTools\Autoloader.php(134) : eval()'d code(7): XenForo_Model::create('DevTools_Model_...')
#1 D:\XenForo\src\public_html\library\XenForo\Dependencies\Abstract.php(178): XenForo_Dependencies_Public->_handleCustomPreloadedData(Array)
#2 D:\XenForo\src\public_html\templatesync.php(13): XenForo_Dependencies_Abstract->preLoadData()
 
These tools take some custom work to get going which I can't support at this time as I am making new ones using composer packages to build on a proven set of dependencies. I will post here when they are done, should be a much more stable system.
 
Fair enough, appreciate the efforts to date. We are using a kludgey in-house solution at the moment but keen to have relevant templates update on load like your solution. Chris seemed to have some luck with an older version, I might update to then and see if I can make progress and learn some more from it.
 
Fair enough, appreciate the efforts to date. We are using a kludgey in-house solution at the moment but keen to have relevant templates update on load like your solution. Chris seemed to have some luck with an older version, I might update to then and see if I can make progress and learn some more from it.
The reason for this new versions is actually so my build tools work for him. So when they do get finished they will work fine with windows.
 
Top Bottom