scipper15
Forum Replies Created
-
Hallo Thomas,
vielen Dank. Diesen Shortcode habe ich bereits verwendet.
Hier haben wir aber das Problem, dass wir ein Plugin für eine globale Mediathek verwenden. Und somit gibt dieser Shortcode alle Bilder aus allen Multiseiten aus. Wir m?chten jedoch nur die Bildquellen einer Seite anzeigen.Viele Grü?e,
ChristinaHallo Thomas,
vielen Dank für deine schnelle Antwort.
Ja, die Bilder werden auch in die Mediathek von WordPress geladen und tauchen nicht in der Gesamtliste auf.Grü?e,
ChristinaForum: Plugins
In reply to: [Multisite Language Switcher] Custom Post Type rewrite / translating slugHi Dennis,
thanks for your reply. I tried what you suggested, on the French site for instance the permalink gets translated in the backend when I open the post there (if the post_type_key stays the same) and now I can assign the translated pages to each other, as the slug key is the same by using the msls-dropdown in the backend of the pages of this post type.
It also gets translated in the “normal” menu on French Site. But when I click it, the url with translated slug doesn’t work as the translated CPT-slug still doesn’t seem to exist. The untranslated slug in the URL still works though. I tried and resaved permalinks with no effect.
Secondly: I need the slug translated when I visit the post type in the frontend, switching between languages with your plugin. So when I am on the German site the translated version for the German site should be “reinigungs_anlagen” (stay the same), for English version “cleaning_plants” and for French version “install_de_nettoyage”.
I tried this on Dev-Server thus you can’t access it (if you like I can send you htaccess credentials via private message, so you can take a look).
There, if I am on the German version of the page
https://dev.pero.ag/reinigungs_anlagen/waschtisch/
the URL for the French page provided by language switcher still is:
https://frdev.pero.ag/reinigungs_anlagen/fontaine-de-nettoyage/
instead of
https://frdev.pero.ag/install_de_nettoyage/fontaine-de-nettoyage/But this seems to be logical, as the french translation just comes into play on the French site, not on the German or English one. So this doesn’t work that way.
I found a hook ‘msls_options_get_permalink’ from your plugin page. Using it as in the example on
https://msls.co/developer-docs/hook-reference.html#msls-options-get-permalink doesn’t bring me to the solution either.function my_msls_options_get_permalink( $url, $language ) { $language = get_locale(); echo "String-Replace for $language<br>"; echo "Original url: $url<br>"; if ( 'de_DE' == $language ) { $url = str_replace( '/reinigungs_anlagen/', '/reinigungs_anlagen/', $url ); } if ( 'fr_FR' == $language ) { $url = str_replace( '/reinigungs_anlagen/', '/install_de_nettoyage/', $url ); } if ( 'en_US' == $language ) { $url = str_replace( '/reinigungs_anlagen/', '/cleaning_plants/', $url ); } echo "Url after replace: $url<br>"; return $url; } add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );
When I read those debugging messages on the French page it gives back:
“String-Replace for fr_FR (so it will enter the second “if”)
Original url: https://dev.pero.ag/reinigungs_anlagen/waschtisch/
Url after replace: https://dev.pero.ag/install_de_nettoyage/waschtisch/”It works different as I would expect: The German (!) url becomes translated to the french slug, but the french slug stays the same:
https://frdev.pero.ag/reinigungs_anlagen/fontaine-de-nettoyage/I really don’t understand why and need further assistance on this.
If you have further questions please let me know. Thanks for your help.
Regards
ReinhardHi Thomas,
ich habe das Bild aus der Mediathek entfernt und nun kommt es auch nicht mehr in den Quellenangaben vor. Allerdings k?nnen wir das nicht grunds?tzlich bei allen Bildern so handhaben, denn die entsprechenden Bilder werden u. U. auch noch auf anderen Seiten verwendet und ?ndern sich auch ?fter mal.
Prüft dein Plugin beim Speichern der Seite, ob die entsprechenden Anh?nge / Bilder überhaupt noch auf der Seite vorliegen?
Hier noch der Link: https://tea-transfer.de/technologietransfer-kongress/
Gru?
ReinhardHallo Thomas,
ich habe den Beitrag erneut gespeichert, was leider nichts an der Situation ge?ndert hat. Ob ich das Bild aus der Mediathek l?schen kann muss ich erst nachfragen. Ich bekomme dafür aber frühestens Ende der Woche Feedback. Sobald ich Feedback habe, gebe werde ich es ggf. ausprobieren und berichten.
Danke!
Grü?e
ReinhardHi,
danke für deine schnelle Antwort. Ja, das entsprechende Bild ist noch in der Mediathek, aber im Beitrag nicht mehr verlinkt.
Grü?e
ReinhardHi,
I updated to the new version 3.3.17, but still no change in behavior. Feedzy basically ignores the offset. Is there a fix to this problem in sight? As I understand it, https://www.ads-software.com/support/topic/only-displaying-5-posts-in-front-end/#post-12302961, doesn’t seem to be the same problem.
Regards
ReinhardHello,
thanks for coming back on this. I suppose browser caching / server configuration issues, too, as it is so unpredictable when those problems occure (sometimes they do and “suddenly” they disappear). Website is behind a Nginx proxy, mabey there is some agressive header configuration too. As soon as I have nailed the reasons behind this behaviour I’ll give you an update on this. Mabey then (when cleared) it might be a good idea to have this kind of issue added to a FAQ section of the addon, if there is one, as the problem is definitely not plugin or theme originated.
Best regards
ReinhardIt was strange, problem disappeared after using an inkognito-tab. The only two things which I did meanwhile were the ones mentioned in my last post. Uploads are successfull again. I don’t exactly know why.
- This reply was modified 5 years, 9 months ago by scipper15.
That’s so strange, it’s working again. Had to delete cache / open inkognito-tab.
Other than that I did the following:
Added the following in .htaccess file at the WordPress root folder:
# Exclude the file upload and WP CRON scripts from authentication
<FilesMatch “(async-upload\.php|wp-cron\.php|xmlrpc\.php)$”>
Satisfy Any
Order allow,deny
Allow from all
Deny from none
</FilesMatch>AND
Your server may have mod_security, and it might be causing problems:
Disable it to see if that is the problem.
To do this, make an .htaccess file in your wp-admin directory.
Add the following code to it:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>FROM: https://docs.presscustomizr.com/article/229-fixing-errors-when-uploading-images-in-wordpress
Regards
ReinhardHello,
I have to come back to this thread: The problem miraculously disappeared a while ago but recently came back. Problem is that I even disabeled all Plugins (except BuddyPress and BuddyPress DOCS) and changed theme to Twentynineteen for testing just in case there was some plugin or theme interferrence: but it is not, the problem persists in this minimal configuration.
I updated to WordPress 5.1 meanwhile (problem was there before this update) and to BuddyPress 4.2.0 (from 4.1.0) and BuddyPress DOCS is up to date too (2.1.2).
Console says “POST https://mitgliederbereich.chemie-kvi-bayern.de/wp-admin/async-upload.php 403 (Forbidden)”
Can you help me here please or at least tell me where to look at to debug further. There are no log entries in PHP-error log concerning this error.
Best regards
ReinhardHello David,
thanks for your reply.
The ajax-request uses for example 212b462ef4 as the nonce.
But I found that in this try nonce was there 2 times (in source code of Website, examined with developer tools):
Once here:<div id="doc-submit-options"> <input type="hidden" id="_wpnonce" name="_wpnonce" value="<strong>0b7327d018</strong>"> <input type="hidden" name="_wp_http_referer" value="/docs/create/"> <input type="hidden" id="doc_id" name="doc_id" value="31506"> <input type="submit" name="doc-edit-submit" id="doc-edit-submit" value="Save"> <a href="" class="action safe">Cancel</a> </div>
and once in the JavaScript part (“var _wpPluploadsettings = […]”. But the nonce in the JavaScript is different, it’s 212b462ef4. But both times it’s a nonce from BuddyPress Docs, right?
What can I do further for testing / debugging?
Thanks for your help.
Beste regards
Reinhard EichhornHallo again, and thanks for the fast reply!
The response of the ajax-reuqest is “-1” as you supposed.
To your second point “check_ajax_referer()”: I could, but actually don’t know where to do it. Can you give a brief explanation where to put this code snippet? Is anywhere in the functions enough? Which arguments do I use?
<?php check_ajax_referer( $action, $query_arg, $die ) ?>
Thanks again, hope this helps.
Beste regards
Reinhard EichhornHello Boone,
thanks for your reply!
– exactly that’s the problem: It’s working without problems in the WordPress media library.
– as far as I noticed I can’t upload any file independently of size and file type. Till now I did all those trys as Super Admin.
– Yes, ajax request goes to https://c-vbci-kvi.allprojects.co/wp-admin/async-upload.php
– Changing the associated group for example seems to work (opens 4 AJAX Requests, all result in 200/OK). There are no other 403s in the console.
– HTTPS is not enabled still. We still don’t have a production site.Directories are writable btw. and have the correct owner (www-data, user of the webserver) is set. In /wp-content/uploads/bp-attachments there is a subdirectory called “0” (“zero”) and in there there are two files with following name and content:
test.html: “This is a test of the Protected Attachment feature of BuddyPress Docs. Please do not remove.”
.htaccess:
“# BEGIN BuddyPress Docs
RewriteEngine On
RewriteBase /
RewriteRule (.+) ?bp-attachment=$1 [R=302,NC]
# END BuddyPress Docs”But I don’t think that’s relevant in this context. There are no other files beneath /wp-content/uploads/bp-attachments btw.
Best regards
Reinhard EichhornHello Michael,
thanks a lot for the feedback.
If reasonably possible it would be nice, if you just dropped a line, weather with the new if-Statement the problem is being solved or not.
Best regards and thank you
Reinhard Eichhorn