Forum Replies Created

Viewing 15 replies - 1 through 15 (of 77 total)
  • Logging as in the database or WP/Asgaros as PII, true, but the web server stores it! Convert the IP to a uuid and/or serialize, stored a client side cookie via javascript with a proper privacy policy page update, checking uri for forum slug and store hash/session id in your — then time it out—- but even doing so in any format ip’s are not reliable due to possibility of a shared wan ip on a network, proxy/firewall or public computers blocking/spoofing. No easy one for this.

    The redirect is working and your forum behaving normally so could be as simple as cached versions of your forum prior to the solving are still being picked up. If true, in time this will settle out as caches expire, or look at those debuggers setup etc., I guess?

    As you did not include a full URL to test with domain so I can verify your .htaccess having the redirect directives enabled, my only comment at this point is to assume you did, so if true your webhost does not support either .htaccess or mod_rewrite. If it is redirecting then the tools you mentioned should work since this is a SERVER SIDE redirect via your web server. Test it manually.

    On my forum the absence of a trailing slash after the forum slug results in a redirect to the url with the trailing slash added. The issue the OP raised caught my attention as either format (xxx/ = directory, otherwise xxx is a file) will be properly indexed but the site should render url’s and any canonical the same format through out simply to avoid content duplicate indexing which is an SEO concern only.

    Beyond the advice given check or re-apply the default .htaccess generated by WP and might be modified by cache/SEO plugins, and the redirect behavior I noted earlier should occur.

    Here’s my .htaccess noting I use latest WP and Comet Cache Pro/All in One SEO and SSL forced for all pages:

    # BEGIN Comet Cache WmVuQ2FjaGU (the WmVuQ2FjaGU marker is required for Comet Cache; do not remove)
    
    # Enable GZIP compression.
    <IfModule deflate_module>
      <IfModule filter_module>
        AddOutputFilterByType DEFLATE text/plain text/html
        AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
        AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
        AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
        AddOutputFilterByType DEFLATE font/opentype application/font-otf application/x-font-otf
        AddOutputFilterByType DEFLATE font/truetype application/font-ttf application/x-font-ttf
      </IfModule>
    </IfModule>
    
    # Enable browser caching.
    FileETag mtime size
    
    <IfModule expires_module>
      ExpiresActive on
      ExpiresDefault "access plus 1 week"
    </IfModule>
    
    # Force a trailing slash on all virtual requests (except WP admin area).
    <IfModule rewrite_module>
      RewriteEngine On
      RewriteBase /
    
      # If not a real file or directory.
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
    
      # Not a part of the WP admin area.
      RewriteCond %{REQUEST_URI} !(?:^|/)wp\-admin(?:/|$)
    
      # Not a REST request, which never redirects.
      RewriteCond %{REQUEST_URI} !(?:^|/)wp-json(?:/|$)
    
      # If there is no trailing slash.
      RewriteCond %{REQUEST_URI} !/$
    
      # Force a trailing slash on all virtual requests.
      RewriteRule ^(.*)$ $1/ [QSA,L,R=301]
    </IfModule>
    
    # END Comet Cache WmVuQ2FjaGU
    
    #AddHandler mod-fcgid .php
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    # SSL #
    RewriteEngine on
    RewriteCond %{REQUEST_SCHEME} =http
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    # HSTS SSL #
    Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
    
    Thread Starter jgoldbloom

    (@jgoldbloom)

    Friendly url’s is long term change, but a couple quick comments in response:

    Home page dynamic full page content is resolved by iframe or ajax, or simply don’t cache but the latter is a terrible performance hit. That’s #1 reason using a dynamic plugin as a home page is ill-advised by anyone to do if home page performance matters. On small, lower traffic sites, cool. Not for me – but very technically possible.

    The WP doc stating “A STATIC front-page can not have DYNAMIC content” is intended to reflect what I noted above, but is a philosophy not suitable to modern rich web 2.0 and, my in my view, “should” not have dynamic content, showing the immaturity of WP in certain regards. But free CMS’s, that’s life!

    Interesting to note bbPress easily allows home page integration by combining short code in a page plus settings > READING > Front page displays -> “Forum”, but the performance limitations don’t go away of course.

    In my summary view, all plugin authors should be agnostic in home page/cache approaches with respect to that harsh WP doc you quoted – that’s a concern left to the admin, i.e. iframe/ajax/disable cache regardless of the url structure for the home page.

    Thread Starter jgoldbloom

    (@jgoldbloom)

    Quick page I’d like you to see regarding a workaround on a WP ajax call and query string that ensures no page refresh with proper response:

    https://wordpress.stackexchange.com/questions/182811/the-correct-method-to-pass-query-vars-in-ajax-using-ajaxurl

    …and WP core has wp_localize_script() related to this, likely, and in the description of the doc page linked below it explains why:

    https://codex.www.ads-software.com/Function_Reference/wp_localize_script

    • This reply was modified 7 years, 10 months ago by jgoldbloom. Reason: added second link
    Thread Starter jgoldbloom

    (@jgoldbloom)

    (apologies in advance to any others following, this is now deeper dive tech talk between two developers, bear with us)

    @asgaros

    First important point – the power of a full cache enabled site, especially home page and sidebar widgets, is crucial to performance and bandwidth. I use Comet Cache Pro which is amazing and full cacheing enabled, but key for me and many folks like me is the want both real time updates of certain content like the recent posts/topics widgets AND a super fast parent page holding that widget. To be specific, full cache with ajax in the sidebar for my home page, and it works spectacularly with my version of your widget.

    Which now brings me to point #2 – Most cache plugins do NOT support url’s with query strings, i.e. ?foo=x&foo2=y. Coming from the Drupal world and with copious experience with respect to this issue and web apps, using friendly url’s i.e. /foo/x/foo2y, is crucial as as standard for all developers for 3 hugely important reasons: security i.e. XSS/sql injection, SEO, and human friendly semantics. Now I certainly don’t expect you to address this due now due to this issue, I know it’s on your long term radar, and would be a massive effort for many reasons. But, it plays a role here. My now formal request is to address this concern sklowly and properly, but start rolling on this because of BOTH points I noted these last two paragraphs for the long term resolution.

    Okay, with all that being said, the reality is an interim and viable solution with far less effort is where we are on the post link/query string issue. I am going to assist a bit by exploring WP core and ajax issues with plugin classes and query data, and look deeper into your code to try to find an easy fix if possible on my local sandbox. I’ll be responding here as time permits.

    All I ask at this point is suggest two heads are better than one, please continue in your role, let’s see how it goes, knowing as time permits for your heavy workload. Before I post here again with followup, I hope you view my two points as being far more important from a high level view than just a widget fix, correcting this through any means will be a huge addition to your features list to grow Asgaros.

    Thanks for reading, comments appreciated, let’s keep in touch on this, here.

    Cheers.

    Thread Starter jgoldbloom

    (@jgoldbloom)

    Yep, when quickly debugging the issue prior to making my widget I came to the same general conclusion about scoping/init issues of your parent class members, as a test I globally called the class object (global $asgaros;) just prior to the post link line in the widget code but no success and did not delve further. I’m sure in time you’ll find a solution, recall it only affects the post link in the final rendering, rest worked great, focus/debug there I suppose. Many cheers to you for this.

    FYI

    If the webhost found nothing and other themes the same issue it could be in the file system so make sure you have latest version of WP, re-upload it and make sure your ftp or publishing client is not binary uploading php files and your php versioh is supported. Beyond this, not a clue considering no errors in screens or logs which is why my suggestions are file system based which you control. Good luck to you, I will let others comment.

    Thread Starter jgoldbloom

    (@jgoldbloom)

    @asgaros – not sure why this is marked as resolved as the post link via ajax is still broken in latest stable 1.4.5, so until then two important followups:

    • If you use the No Cache Ajax plugin and that function I added for shortcode support (see earlier code) then to test your native widget add this to the plugin widget in your theme widget setup:

      [cdsnWidget widget_name=”AsgarosForumRecentTopics_Widget” instance=”total=5″]

    • FYI: in my widget, and informally request you add to yours, I appended the date/replies info with the linked current forum name it was posted within, see screenshot below also noting I prefer “Reply” vs. “Answer” since that’s the button name/lingo used in your plugin.

    updated custom widget

    With respect, I acknowledge we all have different tastes cosmetically and some might like the shorter output without the forum name. If you opt to include, these things could be admin options. Thanks and let me know when post link via ajax is addressed so I might retire my widget.

    Cheers. ??

    • This reply was modified 7 years, 10 months ago by jgoldbloom. Reason: added screenshot update
    • This reply was modified 7 years, 10 months ago by jgoldbloom. Reason: fix typo

    @asgaros – have you considered these two approaches:

    • Add support for Asgaros to include WP results via core API functions and parse into yours via PHP output buffering?
    • Store critical forum data in custom field meta data which allow other third party custom search plugins out there to read them? I recognize the performance hit and db impact.

    Just thinking out loud as excellent points on the core limitations.

    Might want to check file permissions on write/temp directory or if upload.php is corrupted. This infers start looking at the file system or web host php.ini uploads settings or restrictions. Just a thought considering no error messages on the screen but worth looking at php error log if you can access.

    • This reply was modified 7 years, 10 months ago by jgoldbloom.
    Thread Starter jgoldbloom

    (@jgoldbloom)

    btw, this line in my widget code:

    `$instance = str_ireplace(“&”, ‘&’ ,$instance);’

    …should have the first argument as “& amp;” without the space as this support forum decoded the html entity even though I used a code block. Aaaaargh.

    Oh, one last thing — remember I wrote my own widget due to the very important post link getting destroyed via an AJAX call using the Asgaros native widget. I opted to use a shortcode in the No Cache Ajax plugin setup for my widget but after @asgaros fully ajaxifies the native widget you could directly call it via the plugin, no need for shortcode stuff or my widget.

    Thread Starter jgoldbloom

    (@jgoldbloom)

    Your response leads me to believe you might be thinking the form tag [cdsn-link] always displays in the email, regardless of the user submitted value.

    To clarify, the tag only shows in the email if the url field is optional and the user leaves it blank. Meaning if the user enters a valid url and submits, the url correctly displays in the email.

    I already copy/pasted the exact relevant form template setup plus the exact email result which means the mail template is the same. It’s a very simple setup and all you need.

    Please address this issue.

    On a side note, you might consider these feature requests related to this issue:

    • Add another url field type option “emptyValue: foo” where foo is text that displays in the email if the optional field is left blank when submitted, i.e. [url cdsn-link emptyValue:”None” default:”https://”%5D
    • Notice in that example I used the default option as well, the concept is to show the default value within the input tag, but (and this is key) if the submitted value exact matches the default value, display in email the emptyValue instead.
    • If also specifying a placeholder then use that input tag attribute instead of the “default” input tag attribute your plugin is generating which is NOT the same thing! I checked your form html rendered to the browser to confirm this is indeed happening. Major mis-understanding on your part, the placeholder displays to the user within the input field but should disappear when they start typing and never be submitted with the form as that’s the intended purpose of the default attribute.
    • This reply was modified 7 years, 10 months ago by jgoldbloom. Reason: formatting and clarification
    Thread Starter jgoldbloom

    (@jgoldbloom)

    Subject line still broken in dev version.

    New topic: Jim’s test

    Became:

    New topic: Jim & quot;s test <—- edit: modified to add space after ampersand as this support forum decoded it even in a code block , ugh.

    hmmmm…

    Aha! Just add ENT_QUOTES as 2nd argument to wp_specialchars_decode() which according to the docs decodes single/double quotes also. I looked at your code and no 2nd argument defined so the function defaults to ENT_NOQUOTES which does not decode quotes!

    Simple fix and you’ll nail it! ??

    • This reply was modified 7 years, 10 months ago by jgoldbloom.
Viewing 15 replies - 1 through 15 (of 77 total)