Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27083

Errors in "Extending PlatformUI with new navigation" tutorial

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: n/a
    • Component/s: Documentation
    • Labels:
      None

      Description

      There are few errors in the fourth tutorial in the documentation (https://doc.ez.no/display/DEVELOPER/Extending+PlatformUI+with+new+navigation).

      Tutorial 4, step 3:
      Missing the line:

      service: Y.eZ.DashboardBlocksViewService,
      

      in the last code fragment, inside app.route. Without it the dashboard elements are not loading correctly and console is throwing an error when accessing the dashboard from the /ezconf/list URL.

      Tutorial 4, step 6.2:
      There is no information that configuration in file yui.yml should be changed to:

      ezconf-listviewservice:
          requires: ['ez-serversideviewservice']
          path: %extending_platformui.public_dir%/js/views/services/ezconf-listviewservice.js
      

      which means changing the "requires" parameter. Without that change lists is not showing correctly and the console is throwing an error.

      Tutorial 4, step 6.2, fixing the link issue:
      Code fragment where we are throwing an event should look like this:

      this.fire('navigateTo', {
          route: {
              name: link.getData('route-name'),
              params: {
                  id: link.getData('route-id'),
                  languageCode: link.getData('route-languagecode'),
              }
          }
      });
      

      This way we don't need to subscribe this event in the "ezconf-listviewservice.js" (we could just skip this part of the tutorial) and it still will be working as expected.
      Without that change after clicking any link from the list we don't move to any location and the console is throwing an error.

      Tutorial 4, step 7:
      Analogical to previous fix. Correct code to throw an event:

      this.fire('navigateTo', {
          route: {
              name: 'eZConfListOffset',
              params: {
                  offset: offset,
              }
          }
      });
      

      tutorial 4, step 8:
      Analogical to previous fix. Correct code to throw an event:

      this.fire('navigateTo', {
          route: {
              name: 'eZConfListOffsetTypeIdentifier',
              params: {
                  offset: "0", // offset: 0 does not work, because of a bug in PlatformUI
                  typeIdentifier: select.get('value'),
              }
          }
      });
      

        Activity

        Hide
        Rui Silva (Inactive) added a comment -

        Ok, [~jacek.foremski@ez.no], thank you for the reply.
        I will hold QA procedures on this jira as long as these jira issues are still open.

        Show
        Rui Silva (Inactive) added a comment - Ok, [~jacek.foremski@ez.no] , thank you for the reply. I will hold QA procedures on this jira as long as these jira issues are still open.
        Hide
        Jacek Foremski (Inactive) added a comment -

        [~rui.silva@ez.no] Yes, I followed the tutorial step-by-step, but I wasn't just using the tutorial text (because as you noticed it doesn't cover everything), I was following the code too. My opinion is there is still a lot to fix, so in task https://jira.ez.no/browse/EZP-27371 I created something like this: https://github.com/natanael89/ExtendingPlatformUIConferenceBundle/commits/ezp-27371_add_tags_for_steps. It's the updated code, but I plan to update the documentation too as soon as this PR: https://github.com/ezsystems/ExtendingPlatformUIConferenceBundle/pull/3 gets merged. You should probably do Q&A after we are done with it because at the moment you will just find more bugs and inconsistencies.

        To sum up, I think these two tasks need to be done before the Q&A will make sense:

        Show
        Jacek Foremski (Inactive) added a comment - [~rui.silva@ez.no] Yes, I followed the tutorial step-by-step, but I wasn't just using the tutorial text (because as you noticed it doesn't cover everything), I was following the code too. My opinion is there is still a lot to fix, so in task https://jira.ez.no/browse/EZP-27371 I created something like this: https://github.com/natanael89/ExtendingPlatformUIConferenceBundle/commits/ezp-27371_add_tags_for_steps . It's the updated code, but I plan to update the documentation too as soon as this PR: https://github.com/ezsystems/ExtendingPlatformUIConferenceBundle/pull/3 gets merged. You should probably do Q&A after we are done with it because at the moment you will just find more bugs and inconsistencies. To sum up, I think these two tasks need to be done before the Q&A will make sense: https://jira.ez.no/browse/EZP-27371 https://jira.ez.no/browse/EZP-27436
        Hide
        Rui Silva (Inactive) added a comment -

        Even from a developer's perspective, I think the Step 2 is very omissive of the part to handle the extension configuration, by redirecting the task to be followed from a certain step to a completely different and non-contextualized doc reference at https://doc.ez.no/display/DEVELOPER/Exposing+SiteAccess-aware+configuration+for+your+bundle
        This not only makes following it much more difficult, but also by directing that (mandatory) step to a different part of the documentation that encapsulates much more information, also splits up from a linear tutorial guideline towards a non-linear sequence of steps.
        I believe the steps to adapt at:

        ExtendingPlatformUIConferenceBundle/DependencyInjection/EzSystemsExtendingPlatformUIConferenceExtension.php
        

        should be themselves included and explained in-context on the "Extending PlatformUI with new navigation" tutorial.
        I found out about this mandatory change after reading the part:

        The resulting code can be seen in the 2_configuration tag on GitHub (the interesting part is the EzSystemsExtendingPlatformUIConferenceExtension class), this step result can also be viewed as a diff between tags 1_bundle and 2_configuration.

        and having gone to check the changed files themselves from the github tag "2_configuration" at:
        https://github.com/ezsystems/ExtendingPlatformUIConferenceBundle/blob/2_configuration/DependencyInjection/EzSystemsExtendingPlatformUIConferenceExtension.php

        Further ahead, although even before arriving at the issues reported on this jira issue, on the tutorial "https://doc.ez.no/display/DEVELOPER/Alter+the+JavaScript+Application+routing", on the part "Base plugin code", I am loading the platform ui admin interface normally, with the console open, and I do not see anything different happening at all. I'm supposing I'm expected to see the text strings on ezconf-listappplugin.js show up on my log but I do not see anything show up at all.
        [~jacek.foremski@ez.no] have you followed the tutorial from the beginning step-by-step?
        Because I'm clueless as how to even debug what might be wrong on my following of the tutorial.
        My plugin module identifier is well registered on yui.yml as is the js filename with it. I've gone through comparing the files on my bundle with the ones from the repository and I haven't found a difference.

        Show
        Rui Silva (Inactive) added a comment - Even from a developer's perspective, I think the Step 2 is very omissive of the part to handle the extension configuration, by redirecting the task to be followed from a certain step to a completely different and non-contextualized doc reference at https://doc.ez.no/display/DEVELOPER/Exposing+SiteAccess-aware+configuration+for+your+bundle This not only makes following it much more difficult, but also by directing that (mandatory) step to a different part of the documentation that encapsulates much more information, also splits up from a linear tutorial guideline towards a non-linear sequence of steps. I believe the steps to adapt at: ExtendingPlatformUIConferenceBundle/DependencyInjection/EzSystemsExtendingPlatformUIConferenceExtension.php should be themselves included and explained in-context on the "Extending PlatformUI with new navigation" tutorial. I found out about this mandatory change after reading the part: The resulting code can be seen in the 2_configuration tag on GitHub (the interesting part is the EzSystemsExtendingPlatformUIConferenceExtension class), this step result can also be viewed as a diff between tags 1_bundle and 2_configuration. and having gone to check the changed files themselves from the github tag "2_configuration" at: https://github.com/ezsystems/ExtendingPlatformUIConferenceBundle/blob/2_configuration/DependencyInjection/EzSystemsExtendingPlatformUIConferenceExtension.php Further ahead, although even before arriving at the issues reported on this jira issue, on the tutorial "https://doc.ez.no/display/DEVELOPER/Alter+the+JavaScript+Application+routing", on the part "Base plugin code", I am loading the platform ui admin interface normally, with the console open, and I do not see anything different happening at all. I'm supposing I'm expected to see the text strings on ezconf-listappplugin.js show up on my log but I do not see anything show up at all. [~jacek.foremski@ez.no] have you followed the tutorial from the beginning step-by-step? Because I'm clueless as how to even debug what might be wrong on my following of the tutorial. My plugin module identifier is well registered on yui.yml as is the js filename with it. I've gone through comparing the files on my bundle with the ones from the repository and I haven't found a difference.
        Show
        Dominika Kurek added a comment - - edited All changes applied, in: https://doc.ez.no/display/DEVELOPER/Alter+the+JavaScript+Application+routing https://doc.ez.no/display/DEVELOPER/Build+the+content+list https://doc.ez.no/display/DEVELOPER/Paginate+results https://doc.ez.no/display/DEVELOPER/Filter+by+Content+Type https://jira.ez.no/browse/EZP-27371 has been created to handle changes to the associated repository.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jacek Foremski (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: