Blog not working in custom theme

  • Hello,


    I am experiencing a issue with the comments in a blog post while using my own custom theme.

    When I open a blog post I see this: {{ message }}

    And this: {{ 'Comments are closed.' | trans }}

    As far as I can tell it's vuejs related, I can see that vue is loaded in to the view.

    Can anyone explain this? What am I doing wrong?


    Attachment contains the message's in the way I see them.


    Thanks,


    Jesse Mulder

  • SAB

    Approved the thread.
  • Check the debug console in the browser for javascript errors. Probably some scripts are missing which implement the comment functionality.

    The LORD is my strength and my shield; in him my heart trusts, and I am helped; my heart exults, and with my song I give thanks to him. Psalm 28,7

  • No errors in the firefox console. Also in log under the debug bar from pagekit is no single error or info

    Hello Jesse,


    first of all welcome to our community forum.

    I don't know if it us important, but all original themes or even templates from other users has always a Blog folder with some view files in it. It's used for overriding default view of the original blog extension. Well however the needed Java script files as css are declared there as well. So give it a try please and the following:


    Could you probably copy from one original yootheme templates the above mentioned folder to your template (same folder structure is important) and try then again? It's an unusual error so I guess we need to test some things out.


    Regards,


    Fossy

  • Dear Fossy,


    I did what u suggested, I coppied the blog folder including the contents from the theme-one theme to my own and it still did not work.

    Also there are still no errors in the console log of my browser. Any thing else I can try?

    Thanks for waiting/helping and sorry for my late response but this is a project I only work on in the weekends or free evenings.


    Kind regards,

    Jesse

  • Dear Jesse,


    Well sounds not good at all, and you enabled the comments function as setup the Google recaptcha in pagekit's backend?


    drop me a message with the url I will try to check it too if I can find any additional information why it's failing.


    Regards


    Fossy


    P. s. the most of us are doing cms and stuff around web beside everything else. This is a community based forum as we sit all in same sinking boat. Just try to help each other as good as we can and learn some things as usual from each other. ✌️

  • Dear Fossy,


    I have no public url at the moment if its needed I can create one.

    As soon as I switch to a other/default pagekit theme it instantly works.

    So that seems to exclude a configuration error on my side.

    In the attachments you find the teme zip as it is right now.


    * If you have any suggestions in my files please let me know.


    Regards,

    Jesse


  • Dear Fossy,


    I installed a clean version of pagekit on my webserver and installed the theme.

    It seems to be working now...

    Weird that this happend thanks for helping me.


    Regards,

    Jesse

  • Oh okay that sounds great! At least you can work now further on your template right?


    Do you use an external webserver application? Give a try to run pagekit with build in webserver it has way less issues due local develpment then!


    Here in Forum are many topics available how to start it throught the cli with php native binaries instead of any 3rd party webserver solutions.


    Regards,


    Fossy

  • Dear Fossy,


    I did find the cause of this behaviour, when i add a sidebar item like a text block the blog message breaks. As soon as a dissable this widget on the sidebar things are working again. Any idea how this can happen?


    Regards,

    Jesse

  • Hey,


    Well I would suggest it's the grid Syntax it's most important to have no mistake there as it would break out for sure and then you think it's not there but it is, just not visible because it's outa space.


    Just an idea without debugging it's hard to say tbh.


    Regards


    Fossy

  • Damn, finally found it! :)

    I renderd for some weird and unknown reason the content twice.

    Like this:

    Code
    1. <?= $view->render('content') ?>
    2. .....
    3. <?= $view->render('content') ?>
    4. ... footer

    Wat heeft du? Ik wel ook spelen. ☺️


    Hey Jesse,


    Well what I see directly without looking the code that you have copied the bug from YOOtheme in the blog view override. Somewhere at the bottom the pagination ul element isn't closed. If you close. that one you should. have a nice behavior for pagination.


    Beside that I would consider Center the pagination as it's weird when it's left somehow.


    Did you used a uikit 2 as framework? You could do the same with uikit 3 and have way less complications in my opinion as the Syntax is easier.


    Less code = more speed and some new effects too.


    Regards


    Fossy


    P.s.


    Probably some more positions and you good to go, looks simplified at minimum till now and as far I know many fans out there of such simplicity. ✌️

  • My whole problem only was that I let the pagekit system insert the content twice. While doing this it had created the comment box in the blog posts twice so a single id was not there so vue could not find the correct box and gave up. Hope that some one with the same issue will understand and have it fixed quicker than me ;)