Jump to content

gmclelland

Members
  • Posts

    545
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by gmclelland

  1. Thanks @jmartsch, @Wanze, and @tpr. I tried this and it works: {{ config.httpHost }} So I know TemplateEnfineTwig and TemplateEngineFactory modules are passing the config variable correctly into the twig template. @jmartsch said that it no longer exists. I wonder why $config->urls->root is still listed on https://processwire.com/api/variables/config/. It also works in my template file basic-page.php if I set it to variable and then pass it to the view, just not in my basic-page.twig file. I did a bd( $config->urls->root ) in my basic-page.php and it returns "/" I also did a bd ($config->urls); in my basic-page.php and I did notice _root = "/". Maybe the underscore prefix means it is private, which is why it bombs out when {{ config.urls.root }} ?
  2. Hi @Wanze, any idea why I can't do this in my twig templates? {{ config.urls.root }} or // with TracyDebugger installed {{ bd(config.urls.root) }} Both of these result in errors. Exception: An exception has been thrown during the rendering of a template ("Method Paths::root does not exist or is not callable in this context") in "basic-page.twig" at line 4. I have this option checked.
  3. No, I haven't tried upgrading the Essence lib. The essence library creator did answer me at https://github.com/essence/essence/issues/127. He basically said it was a problem with that page on soundcloud.com. That makes me wonder if this module also needs a check for if ($embedCode=NULL) { continue } around line 130... in case there is a problem with the embedded object's oembed site not returning anything. In that case do nothing and just leave the link the way it is. At least that would keep the page from throwing an error.
  4. Hrmm... I only have one text formatter on the body field. Textformatter OEmbed Can you try embedding https://soundcloud.com/thirdday/i-need-a-miracle-1 and see if you get an error? If I try the following on line 130 it gives the error because $test is NULL $test = $this->essence->extract("https://soundcloud.com/thirdday/i-need-a-miracle-1"); bd($test); However, if I try the following it works $test = $this->essence->extract("https://soundcloud.com/centricitymusic/jordan-feliz-the-river"); bd($test); This makes me think that it is something wrong with the essence php library and not the textformatter-oembed module. I started an issue at https://github.com/essence/essence/issues/127 It looks like textformatter-oembed is running 3.2.0. The latest essence library is at 3.3.0 maybe that will fix it?
  5. Strange... I tried a different song on soundcloud.com and the module worked fine. This works: https://soundcloud.com/centricitymusic/jordan-feliz-the-river but this doesn't (throws the error) https://soundcloud.com/thirdday/i-need-a-miracle-1
  6. Other embeds like youtube and twitter work fine. Just make sure you link the pasted url. If I use TracyDebugger to bd($embed); on line 130, it shows $embed = NULL. That looks strange. It should have a php object. I'm not sure why it is failing. Maybe @felix knows more?
  7. 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}
  8. I haven't used it much yet, but have you tried https://github.com/justb3a/processwire-twigextensions to get the dump functionality. Maybe it would work better?
  9. For reference, here is the bug report https://github.com/processwire/processwire-issues/issues/187
  10. Thanks @Robin S. Ya, I also noticed you can do: $page->url(true); which respects the template's slashUrls setting as well.
  11. Thanks @szabesz. I just wanted to post to forums to get some feedback before I fill a bug report on github.com.
  12. Here is a pull request to fix the problem https://github.com/nicoknoll/MarkupSEO/pull/36 Hope that helps
  13. 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?
  14. Hi all, I noticed what I think is a bug. It seems like MarkupSEO doesn't respect the "Should page URLs end with a slash?" template setting. I don't like having the trailing slash on the end of my urls. I noticed MarkupSEO outputs the following: <link rel="canonical" href="http://mywebsite.dev/support-us/donate/"> When the actual url of the page is http://mywebsite.dev/support-us/donate
  15. I also like: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions https://getgrav.org/blog/macos-sierra-apache-mysql-vhost-apc https://getgrav.org/blog/macos-sierra-apache-ssl
  16. Great job @adrian and @tpr! Just tried it and it looks and works very nicely.
  17. 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
  18. It's a subtle difference that can only be seen when toggling back and forth. Here is the frontend Here is the backend
  19. 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.
  20. @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.
  21. Thanks, but I actually found the hook priorities using your awesome TracyDebugger module! ?
  22. 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?
  23. The site that is having a problem is using the Twig template engine using https://github.com/wanze/TemplateEngineFactory and https://github.com/wanze/TemplateEngineTwig. I wonder if it is because the TracyDebugger module is using a hook to add the javascript? I'm not very familiar with hooks, but maybe the hook doesn't run after Twig has compiled the markup?
  24. 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.
  25. 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?
×
×
  • Create New...