Jump to content

gmclelland

Members
  • Posts

    566
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by gmclelland

  1. Ya @Macrura, I'm seeing this as well on my PW3 3.0.52 install.

    I get the following error when trying to embed a soundcloud.com track.

    PHP Notice: Trying to get property of non-object in .../TextformatterOEmbed/TextformatterOEmbed.module:131

    Here is the stack trace

    exception 'ErrorException' with message 'Trying to get property of non-object' in /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TextformatterOEmbed/TextformatterOEmbed.module:131
    Stack trace:
    #0 /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TextformatterOEmbed/TextformatterOEmbed.module(131): Tracy\Bar->Tracy\{closure}(8, 'Trying to get p...', '/Users/glenn/we...', 131, Array)
    #1 /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TextformatterOEmbed/TextformatterOEmbed.module(244): TextformatterOEmbed->getEmbedCode('https://soundcl...')
    #2 /Users/glenn/websites/pw3/wwwroot/wire/core/Textformatter.php(60): TextformatterOEmbed->format('<h2>Si lobortis...')
    #3 /Users/glenn/websites/pw3/wwwroot/wire/modules/Fieldtype/FieldtypeText.module(94): ProcessWire\Textformatter->formatValue(Object(ProcessWire\Page), Object(ProcessWire\Field), '<h2>Si lobortis...')
    #4 /Users/glenn/websites/pw3/wwwroot/wire/modules/Fieldtype/FieldtypeTextarea.module(119): ProcessWire\FieldtypeText->___formatValue(Object(ProcessWire\Page), Object(ProcessWire\Field), '<h2>Si lobortis...')
    #5 [internal function]: ProcessWire\FieldtypeTextarea->___formatValue(Object(ProcessWire\Page), Object(ProcessWire\Field), '<h2>Si lobortis...')
    #6 /Users/glenn/websites/pw3/wwwroot/wire/core/Wire.php(376): call_user_func_array(Array, Array)
    #7 /Users/glenn/websites/pw3/wwwroot/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___formatValue', Array)
    #8 /Users/glenn/websites/pw3/wwwroot/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessWire\FieldtypeTextarea), 'formatValue', Array)
    #9 /Users/glenn/websites/pw3/wwwroot/wire/core/Page.php(1376): ProcessWire\Wire->__call('formatValue', Array)
    #10 /Users/glenn/websites/pw3/wwwroot/wire/core/Page.php(1376): ProcessWire\FieldtypeTextarea->formatValue(Object(ProcessWire\Page), Object(ProcessWire\Field), '<h2>Si lobortis...')
    #11 /Users/glenn/websites/pw3/wwwroot/wire/core/Page.php(1307): ProcessWire\Page->formatFieldValue(Object(ProcessWire\Field), '<h2>Si lobortis...')
    #12 /Users/glenn/websites/pw3/wwwroot/wire/core/Page.php(1069): ProcessWire\Page->getFieldValue('body')
    #13 /Users/glenn/websites/pw3/wwwroot/wire/core/Page.php(1552): ProcessWire\Page->get('body')
    #14 /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ProcesswireInfoPanel.php(296): ProcessWire\Page->__get('body')
    #15 /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(133): ProcesswireInfoPanel->getPanel()
    #16 /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Bar.php(89): Tracy\Bar->renderPanels()
    #17 /Users/glenn/websites/pw3/wwwroot/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-master/src/Tracy/Debugger.php(254): Tracy\Bar->render()
    #18 [internal function]: Tracy\Debugger::shutdownHandler()
    #19 {main}

     

  2. I'm just curious why $page->httpUrl returns

    mysite.dev/about-us/

    When it should return

    mysite.dev/about-us

    when the template's settting "Should page URLs end with a slash?" is set to "No"

    I also noticed $page->url returns correctly

    mysite.dev/about-us

     

    Is that a bug with $page->httpUrl in the Processwire API or am I missing something?

  3. To fix the toggle button height and width jumping, I had to add the following to #show-button:

    box-sizing: border-box;
    line-height: normal;
    padding: 4px 15px 2px 6px !important;
    width: 16px !important;

    So all together it looks like this:

    #show-button {
        bottom: 0;
        right: 0;
        z-index: 99999;
        position: fixed;
        width: 16px !important;
        margin: 0 !important;
        padding: 4px 15px 2px 6px !important;
        background: #FFFFFF !important;
        border: 1px solid #DDDDDD !important;
        font-size: 12px !important;
        cursor: pointer;
        box-sizing: border-box;
        line-height: normal;
    }

    Works in the default and Reno admin themes and my frontend theme.  Hope that helps

    Here is the pull request https://github.com/adrianbj/TracyDebugger/pull/9

    • Like 1
  4. Nevermind about  #1. I see that works properly.  I was assuming that it would be collapsed by default on every page load.  The actual behavior is that it remembers if it was opened or closed and stays that way between page loads.

    • Like 1
  5. @adrian - Thanks for adding that new feature.  I just tested the new version and noticed a few of issues.

    1. I don't think the "Hide debug bar by default" setting is working for me anymore.  I swear it was working before.  Now, the debug bar always shows expanded when enabled on the frontend or backend.

    2. Maybe add checkboxes for a "Hide debug bar by default on the frontend" and "Hide debug bar by default on the backend" settings?

    3. I don't think the padding got applied to the toggle when the bar is in a collapsed state when viewed on the backend.  I'm using the default admin theme.  You can see this by toggling the bar.  The height of the toggle button doesn't match the height of the debug bar.  It looks fine on the frontend though.

  6. Ok, on line 294 of TracyDebugger.module, I changed it to

    $this->addHookAfter('Page::render', $this, 'addCustomStuff', array('priority'=>'100.7'));

    After I did this, I started seeing the toggle link on the frontend.

    The templateEngineFactory module (Page::render() TemplateEngineFactory::hookRender()) had a priority of 100.5.  TracyDebugger had a priority of 100.4, so it ran too early.

    What do you think is the best way to fix this?

     

    • Like 1
  7. No js errors in the console.  Tried in different browsers as well.  I see the old 'X' button, I just don't see the new toggle button.  Sorry, the site is local.  I'll keep looking into it.

    Home 2017-01-18 09-39-03.jpg

     

    • Like 1
  8. Thanks @adrian that's exactly what I was asking for.  I like the configuration as well.

    I upgraded Tracy on two local sites, one site works correctly on the frontend and backend.  The other site doesn't show the toggle on the frontend, it works fine on the backend.  I'm not sure why yet.  I have tried uninstall/reinstalling the module.  I tried clearing the browser caches.  I tried refreshing the PW modules.  All I see on the frontend is the old Tracy debug bar.

    Do you have any ideas what is causing this?

    • Like 1
  9. @adrian The tracy debug bar takes up a lot of screen real estate, how about adding an option for collapsing the tracy debug bar by default into a "Debug" toggle link that shows fixed in the bottom right hand corner?

    When a user clicks the "Debug" link, it would show the entire bar.

    Currently a user has to refresh the whole page to bring back the toolbar if a user click's the "x" to close the toolbar.  With a toggle link it can appear or disappear.

    Just a thought..

    • Like 1
  10. Looks like the latest version of TracyDebugger 3.5.1 always seems to show up in the backend even though it is unchecked in the TracyDebugger settings.  PWDebugMode is off.  3.5.0 works fine.  I'm on ProcessWire 3.0.45.  Hope that helps

    • Like 1
  11. I read up on latte and liked it, but Twig is so widely used in other CMS systems like Grav, Drupal 8, CraftCms, Bolt.Cm and others.  It seemed better to invest my time learning something a bit more portable.

    Thank you for the suggestion though.

    I also like the Tracy debugger module. I haven't tried yet, but I wonder if that can be used with twig somehow?

×
×
  • Create New...