# خطأ في النشر على WP-Discourse

**URL:** https://meta.discourse.org/t/publish-error-on-wp-discourse/197414
**Category:** WordPress
**Created:** [16 يوليو 2021، 10:08م UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414 "2021-07-16T22:08:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [16 يوليو 2021، 10:08م UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414/1 "2021-07-16T22:08:14Z")

</div>

مرحبًا!

لسبب ما، لم تعد الصورة المميزة لـ WordPress تُنشر في منشورات Discourse.  
أحصل على خطأ `featured_link.post_error` يعيد رمز خطأ 403.

إليك رسالة الخطأ الكاملة في WP-Discourse:

```plaintext
[2021-07-16 22:02:50] publish.ERROR: featured_link.post_error {"wp_title":"Roule Ton Unifest' (Métabief, Jura)","wp_author_id":"17","wp_post_id":159075,"discourse_post_id":"203291","response_message":"Forbidden","http_code":403}

```

هل لديك أي فكرة عن كيفية إصلاح ذلك؟

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [17 يوليو 2021، 2:05ص UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414/2 "2021-07-17T02:05:17Z")

</div>

مرحبًا @Canapin،

> [@Canapin](#):
>
> لن يتم نشر الصورة المميزة من ووردبريس في منشورات ديسكورد بعد الآن  
> …  
> لدي خطأ featured\_link.post\_error يعيد خطأ 403.

الصورة المميزة في ووردبريس والرابط المميز في ديسكورد شيئان مختلفان.

الرابط المميز هو رابط يُطبَّق على مواضيع ديسكورد، ويظهر أسفل عنوان الموضوع داخل الموضوع، وبجانب العنوان في قائمة المواضيع. يمكنك تعيين الرابط المميز في المنشورات المنشورة من ووردبريس باستخدام إعداد النشر `إضافة الروابط المميزة`. لترى كيفية عمل ذلك في أحدث كود من كل من [WP Discourse](https://github.com/discourse/wp-discourse) وديسكورد، راجع

[https://try.thepavilion.io/t/repeating-mistakes-why-the-plan-to-protect-the-world-s-wildlife-falls-short/987](https://try.thepavilion.io/t/repeating-mistakes-why-the-plan-to-protect-the-world-s-wildlife-falls-short/987)

يمكنك إضافة الصورة المميزة لمنشور ووردبريس إلى النص الكامل لمنشور منشور على ديسكورد باتباع الخطوات الموضحة هنا.

> [@Customize the structure of WP Discourse templates](https://meta.discourse.org/t/wp-discourse-template-customization/50754#add-the-featured_image-to-the-publish-template-6):
>
> The [WP Discourse](https://github.com/discourse/wp-discourse) plugin uses HTML templates to add markup to Discourse comments for publishing on WordPress and to WordPress posts for publishing on Discourse. The text content of these templates can be customized on the plugin’s options page. To change the structure of a templates requires you to add a function to your theme’s functions.php file This #howto will explain how to do that. The templates In the plugin’s code, the templates are static functions that return a mixture of html and templ…

#### خطأ السجل الخاص بك

يبدو أن الخطأ الذي تحصل عليه عند طلب الرابط المميز هو خطأ في التفويض. الكود `403` والرسالة “Forbidden” (التي تأتي من ديسكورد نفسها، وليس من [WP Discourse](https://github.com/discourse/wp-discourse)) تخبرنا أن المستخدم الذي قمت بتعيينه في إعدادات اتصال [WP Discourse](https://github.com/discourse/wp-discourse) لا يملك صلاحية استخدام نقطة نهاية تحديث الموضوع (التي تُستخدم لتحديث موضوع لإضافة الرابط المميز).

أنصحك أولاً بمحاولة تحديث رمز API (عيّنه كـ “مفتاح عالمي” عند إنشائه في ديسكورد) الذي تستخدمه في [WP Discourse](https://github.com/discourse/wp-discourse).

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [17 يوليو 2021، 11:33ص UTC](https://meta.discourse.org/t/publish-error-on-wp-discourse/197414/3 "2021-07-17T11:33:53Z")

</div>

شكرًا لك على الإجابة المفصلة ورابط تخصيص قالب [WP Discourse](https://github.com/discourse/wp-discourse). لقد استخدمت بعض الكود من هنا، والآن تعمل صور الميزات مرة أخرى، بالإضافة إلى أشياء أخرى كانت معطلة. كان كل شيء يعمل بشكل جيد قبل أقل من أسبوع، لذا أعتقد أن الكود الخاص بي غير متوافق مع تحديث حديث لـ [WP Discourse](https://github.com/discourse/wp-discourse) أو شيء مشابه.

ومع ذلك، لا يزال هناك خطأ _الرابط المميز_ في سجلات [WP Discourse](https://github.com/discourse/wp-discourse)، رغم أن المنشورات يتم تحديثها بشكل صحيح. 🤔  
وبالرغم من هذا الخطأ المسجّل، يبدو أن كل شيء يعمل بشكل جيد.
