This plugin is the last step to upgrade Drupal 7 Blog. I've tried really hard to get it working.
The first think was trying to enable with with adding a disqus comment field and follow all the nessacary steps. I have the Disqus comment setting when I edit a article, but that's it. No disqus when i'm viewing the article.
I've tried to use it with Blocks. I have the Links for Disqus on my Sidebar in Block settings, but when I click on it the spinning wheel is there for a second and ...nothing. I see a AJAX-Request error in my javascript console
Fatal error: Class 'Drupal\block\BlockBase' not found in /www/htdocs/drupal8/sites/all/modules/disqus/src/Plugin/Block/DisqusBaseBlock.php on line 19
It seems there's a Namespace change and its Drupal\Core\Block\BlockBase
instead Drupal\block\BlockBase
now.
I've tried to fix this but there are still more broken things. Sadly I'm not that deep in Drupal8 yet.
Anyone can help me to track it down?
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2476065-12-14.patch | 398 bytes | JayeshSolanki |
#14 | disqus-Broken-with-Drupal8-2476065-beta9-14.patch | 21.36 KB | JayeshSolanki |
#12 | disqus-Broken-with-Drupal8-2476065-beta9-12.patch | 21.36 KB | camoa |
#9 | disqus-Broken-with-Drupal8-2476065-beta9-9.patch | 20.99 KB | camoa |
#6 | disqus-Broken-with-Drupal8-2476065-beta9-6.patch | 20.57 KB | camoa |
Comments
Comment #1
PESTO3567 CreditAttribution: PESTO3567 commentedComment #2
camoa CreditAttribution: camoa commentedSame here, I enable the field but noting shows in the content view. Trying to figure out why.
Comment #3
camoa CreditAttribution: camoa commentedI have identified the problem, it is related to this change record: https://www.drupal.org/node/2457769
Also the use of theme function and drupal_render is deprecated so I am adding a basic template for the "noscript" tag.
Patch coming soon.
Comment #4
camoa CreditAttribution: camoa at Camo Advanced Tech commentedThis patch adds/changes:
- A template and preprocess function for the tag.
- Changes the disqus.js code to reflect the change noted in https://www.drupal.org/node/2457769 for JQuery.once.
- Some coding standards for the disqus.module (added by phpstorm but it does not harm to add them there, right?)
Please review. Disqus is now loading in my Drupal 8 Beta 9 installation.
Comment #5
PESTO3567 CreditAttribution: PESTO3567 commentedI've tried your patch with a fresh Drupal 8 installation and can confirm Disqus is loading if you add the disqus comment field.
But adding Disqus with Block still fails, seems there's more broken. Anyway, this was a step forward, thank you!
Comment #6
camoa CreditAttribution: camoa at Camo Advanced Tech commentedI checked on the blocks, minor errors including this change record: https://www.drupal.org/node/2344683 and this issue: https://www.drupal.org/node/2412229
Patch attached with blocks working.
Comment #7
PESTO3567 CreditAttribution: PESTO3567 commentedI can add Disqus Blocks now. But the website is completly broken and doesnt load anymore. I've tried "Top Comments" and "Combination Widget".
I'm sorry for the HTML Entities, but thats how it displays in Drupal's Database logger:
<em class="placeholder">Twig_Error_Runtime</em>: An exception has been thrown during the rendering of a template ("The URI "//disqus.com/forums/dotmagic/combination_widget.js" is invalid. You must use a valid URI scheme.") in "core/themes/bartik/templates/page.html.twig" at line 155. in <em class="placeholder">Twig_Template->displayWithErrorHandling()</em> (Zeile <em class="placeholder">328</em> von <em class="placeholder">/home/www/DEV/drupal8/core/vendor/twig/twig/lib/Twig/Template.php</em>).
Comment #8
camoa CreditAttribution: camoa at Camo Advanced Tech commentedmmmm just tried the DisqusComments block in my site, I am trying the rest soon.
Comment #9
camoa CreditAttribution: camoa at Camo Advanced Tech commentedIt seem to be a little change needed in DisqusBlockBase. This should do it but I did not have much time for tests.
Can you please check if the problems are gone?
Thanks!
Comment #10
PESTO3567 CreditAttribution: PESTO3567 commentedThanks for your fast response and the time to fix the incompatibilities. I'm glad to test for you and sorry because that's all I'm doing :)
The Blocks are displayed now, but just the Headlines. My Disqus content is missing, I guess because I'm running it from my local server with different Domain? I will try a test setup on live server soon.
Comment #11
camoa CreditAttribution: camoa at Camo Advanced Tech commentedplease do!
Comment #12
camoa CreditAttribution: camoa at Camo Advanced Tech commentedOk, the problem was in the way the blocks are rendered, I could not find how to do the actual widget, but just passing the markup will do it. For this case I think this will work right.
Comment #13
PESTO3567 CreditAttribution: PESTO3567 commentedThat's it! I didn't test all functionality yet but it looks fine so far!
I'll take a closer look this weekend and report here.
Comment #14
JayeshSolanki CreditAttribution: JayeshSolanki commentedThanks for the patch. I have tested it, and blocks were working fine.
Added a patch with a minor fix in indentation.
Comment #15
hugronaphor CreditAttribution: hugronaphor as a volunteer commentedI confirm that the patch #14 work well.
Comment #16
slashrsm CreditAttribution: slashrsm as a volunteer commentedCommitted.