Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This issue is not due to issue with the title of the "par" but the title of the components. Basically, when you click on the edit button of parsys in design mode, it lists down all the components that are present in your instance (components that are under both /libs and /apps).</p> <p>This is done by the <strong>ComponentSelector.js</strong> present in your widget library. The component selector collects all the groups and components in your instance, ignores the groups that start with a "." (e.g. .hidden), ignores those components without a title, orders all the groups in ascending order of their titles, and then orders all the components under a particular group in ascending order and finally displays the list to the author, where the author gets to select the allowed components for that particular parsys.</p> <p>Now, if there are 2 or more components present with the same name and the same group in your instance, then it tries to append the name of the project behind the component name, for easy identification(when ordered in ascending, these components appear adjacent to each other and it becomes difficult for the author to identify which app the component belongs to). So, for e.g., if there is a component called "downloads" under foundation as well as geometrixx and so on, then it displays it as <strong>downloads(foundation)</strong> and <strong>downloads(geometrixx)</strong> and so on.</p> <p>This piece of code that you mentioned, checks whether the title of the current component and the next one is same, and in case it is different, it breaks the loop, else continues in the loop to append the project name to the title.</p> <pre><code>if (title != this.items.items[i + 1].title) { // next title is different &gt;&gt; break break; } </code></pre> <p>Now, this condition works fine, if the titles of adjacent components under a particular group are same, unless and until the <strong>components with the same title are the last ones in that particular group, when ordered ascendingly</strong>. If, the last 2 components in a group has the same title, then <code>this.items.items[i + 1]</code> would be <strong>null(array index out of bounds exception)</strong> when the title for the last element is being checked with the next one and hence <strong>.title</strong> on an undefined object throws the exception <code>Uncaught TypeError: Cannot read property 'title' of undefined, widgets.js:147092</code>.</p> <p>You can fix this either by replacing the above condition with the following</p> <pre><code>if (i != length - 1 &amp;&amp; title != this.items.items[i + 1].title) { // next title is different &gt;&gt; break break; } </code></pre> <p>Or by making sure that last two component under the same group doesn't have the same name. (This basically happens when you try to copy paste components. Hence making sure to change the title or group after copying an existing component would avoid this issue).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload