Jump to content

gmclelland

Members
  • Posts

    582
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by gmclelland

  1. @Macrura You might not need the json export/import functionality anymore. See this new module
  2. I prefer third party libraries to be included and managed via composer, but if you do include them in this module make sure to do it like this: https://github.com/gmclelland/TextformatterOEmbed/commit/ce3bdcd8145da3a369f56f34979cc0791fdb7fa8 Notice the /*NoCompile*/ to prevent PW3's file compiler from compiling the third party libraries.
  3. I was just reading about that module when you posted. I just tried Module Toolkit...Wow what a time saver! Thanks again adrian.
  4. Hi @adrian, thanks for releasing this module. I really like the concept. I can see this being installed on every site. I was able to copy over my TracyDebugger configs and AdminOnSteroids configs successfully. It may be premature to ask, but is there a way to copy the configs of multiple modules at one time like you can do when you export your field settings?
  5. Try installing the Tracy Debugger module http://modules.processwire.com/modules/tracy-debugger/ . I believe there is new feature in that module to handle ajax errors like this now, but may also require updating Processwire to a newer version as well. It might give you more insight into what is causing the error.
  6. I think this fix https://github.com/madebymats/FieldtypeLeafletMapMarker/pull/9 would solve the problem stated above when using TemplateEngineFactory and TemplateEngineTwig.
  7. Would it be possible to also upgrade the version to a newer Leaflet 1.0.3?
  8. Does anybody know how to customize the map's javascript options when displaying the map on the frontend? I'm trying to turn the mouse scrollzoom off. http://leafletjs.com/reference.html#map-scrollwheelzoom Also for anybody else having trouble when using this with the TemplateEngineFactory and TemplateEngineTwig modules, I had to do the following because my map wasn't showing on the frontend. No errors where displayed and the leaflet assets where loaded on the page. The map just didn't get initialized without the $page->inlineScript. In my controller.php, note how I had to add the $page->inlineScript: $leafletHeaderLines = $map->getLeafletMapHeaderLines() . $page->inlineScript; $view->set('leafletHeaderLines', $leafletHeaderLines ); In my view.twig {{ leafletHeaderLines }} Hope that helps someone.
  9. Bingo! that works. Thank you @Wanze I'm using ProcessWire: 3.0.52
  10. 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 }} ?
  11. 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.
  12. 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.
  13. 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?
  14. 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
  15. 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?
  16. 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}
  17. 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?
  18. For reference, here is the bug report https://github.com/processwire/processwire-issues/issues/187
  19. Thanks @Robin S. Ya, I also noticed you can do: $page->url(true); which respects the template's slashUrls setting as well.
  20. Thanks @szabesz. I just wanted to post to forums to get some feedback before I fill a bug report on github.com.
  21. Here is a pull request to fix the problem https://github.com/nicoknoll/MarkupSEO/pull/36 Hope that helps
  22. 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?
  23. 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
  24. 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
  25. Great job @adrian and @tpr! Just tried it and it looks and works very nicely.
×
×
  • Create New...