You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an editor, modify an entry, save the draft and submit it for approval.
As a publisher, in the workflow settings pane, check the submitted entry and set its status to approved.
As an editor OR a publisher, try to visit the draft entry.
Error.
It's worth noting that this doesn't happen on a rejection, only on an approval. The publishedId field in the DB is null. And, I have reproduced it with the latest version of Workflow, on two separate Craft installations.
I looked into the code, but it seems like it should be set just fine. Any advice?
Impossible to access an attribute ("cpEditUrl") on a null variable
/Users/koty/Sites/123/web/craft/plugins/workflow/templates/_includes/publisher-pane.html(17)
05 {% set pendingSubmissions = craft.workflow.submissions({ status: 'pending' }).count() %}
06 {% set nonPendingSubmissions = craft.workflow.submissions({ status: 'not pending' }).count() %}
07
08 {% if nonPendingSubmissions %}
09 <div class="pane workflow-pane">
10 {% for submission in submissions if submission.status != 'pending' %}
11 {% if submission.status == 'approved' %}
12 <div class="field">
13 <div class="heading">
14 <label>{{ "Approved submission" | t }}</label>
15
16 <div class="instructions">
17 <p><a href="{{ submission.publisher.cpEditUrl }}">{{ submission.publisher }}</a> {{ "approved this entry on {date}." | t({ date: submission.dateApproved | date('jS M Y g:ia') }) }}</p>
18
19 {% if submission.notes %}
20 <p class="code">"{{ submission.notes }}"</p>
21 {% endif %}
22 </div>
23 </div>
24 </div>
25 {% elseif submission.status == 'rejected' %}
26 <div class="field">
27 <div class="heading">
28 <label>{{ "Rejected submission" | t }}</label>
29
2017-01-05 17:12:35 Apache/2.4.23 (Unix) PHP/5.5.30 / Craft CMS 2.6.2954```
The text was updated successfully, but these errors were encountered:
When using element actions to change the status, it raises an onSetStatus event, which I presume is yet to be implemented and would handle adding the publisherId, et al.
However, that event is currently unhandled. Because all other methods of changing a Submission's status use actions, they are unaffected.
As a workaround, we can remove the elementactions code, which results in being unable to use, them obviously, but prevents the issues from occurring. I have a fork that has done this: kotyy@526a3fc
Steps to reproduce:
It's worth noting that this doesn't happen on a rejection, only on an approval. The publishedId field in the DB is null. And, I have reproduced it with the latest version of Workflow, on two separate Craft installations.
I looked into the code, but it seems like it should be set just fine. Any advice?
The text was updated successfully, but these errors were encountered: