Single Listing page 404
-
Just installed the plugin, created a listing (like I would any other page or post), published and and clicked View Listing. Gives me a 404. What am I missing?
-
Reset your Permalinks by going to Settings > Permalinks in your Dashboard and press Save.
Did that, didn’t help.
Try changing your permalinks from the default to Post Name and Save.
Also, when posting to the forum please include as much information as possible, theme name and version number, WordPress version number, and especially a link to the site in question.
I did save it as Post Name and Save. The WordPress version is shown on the right column in these forum threads. ———————–>
Theme is Passage by Qode, version 1.1. Website is https://www.intownelite.com/Thank you. You have an issue with your permalinks and/or redirects in place.
It looks like a redirect is in place for /listings/ which is the same name/slug as the post type.
It’s likely because of this that accessing any listing, which also uses /listings/ (i.e. /listings/xxx-listing-title-xxx/) that you are getting a 404. Check your .htaccess and remove any redirect rules you have in place for listings in the url.
Hmmm. My permalinks have been set to Post Name for years. My IDX plugin requires it, too.
I have no redirects in place in .htaccess or elsewhere. (Other than the standard non-www to www RewriteRule.)
I did have an old listings. subdomain which I had forwarded to www, but I even deleted that just to be sure, but that didn’t help, either.
If you go to /listings/ on my domain, it does redirect to the page with the most similar URL, but that’s standard WordPress behavior when the URL you type in doesn’t exist.
If you go to /listings/ on my domain, it does redirect to the page with the most similar URL, but that’s standard WordPress behavior when the URL you type in doesn’t exist.
Not true.
Your /listings/ URL is now going to the correct archive page template, so whatever you changed recently did have some effect.
Single listings are still 404’ing, and using the post ID (https://www.intownelite.com/?p=9343) does redirect to the proper permalink, so it has to be some htaccess or redirect rules in place on your server that is causing that.
Replace your htacess rules with the standard WordPress rules at the top of this page: https://codex.www.ads-software.com/htaccess You may need to save permalinks again after this is done.
I don’t know how you got the correct archive page template, but when I go to my /listings/ URL it redirects to my /listings-index/ page.
Of course I can’t simply replace my .htaccess with the standard one because my .htaccess must contain the necessary lines for W3TC. But I will post the content of my .htaccess below and see if you can find any redirect that would affect the /listings/ URL. I don’t.
Options -Indexes RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] # BEGIN W3TC Browser Cache <IfModule mod_mime.c> AddType text/css .css AddType text/x-component .htc AddType application/x-javascript .js AddType application/javascript .js2 AddType text/javascript .js3 AddType text/x-js .js4 AddType text/html .html .htm AddType text/richtext .rtf .rtx AddType image/svg+xml .svg .svgz AddType text/plain .txt AddType text/xsd .xsd AddType text/xsl .xsl AddType text/xml .xml AddType video/asf .asf .asx .wax .wmv .wmx AddType video/avi .avi AddType image/bmp .bmp AddType application/java .class AddType video/divx .divx AddType application/msword .doc .docx AddType application/vnd.ms-fontobject .eot AddType application/x-msdownload .exe AddType image/gif .gif AddType application/x-gzip .gz .gzip AddType image/x-icon .ico AddType image/jpeg .jpg .jpeg .jpe AddType application/json .json AddType application/vnd.ms-access .mdb AddType audio/midi .mid .midi AddType video/quicktime .mov .qt AddType audio/mpeg .mp3 .m4a AddType video/mp4 .mp4 .m4v AddType video/mpeg .mpeg .mpg .mpe AddType application/vnd.ms-project .mpp AddType application/x-font-otf .otf AddType application/vnd.ms-opentype .otf AddType application/vnd.oasis.opendocument.database .odb AddType application/vnd.oasis.opendocument.chart .odc AddType application/vnd.oasis.opendocument.formula .odf AddType application/vnd.oasis.opendocument.graphics .odg AddType application/vnd.oasis.opendocument.presentation .odp AddType application/vnd.oasis.opendocument.spreadsheet .ods AddType application/vnd.oasis.opendocument.text .odt AddType audio/ogg .ogg AddType application/pdf .pdf AddType image/png .png AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx AddType audio/x-realaudio .ra .ram AddType application/x-shockwave-flash .swf AddType application/x-tar .tar AddType image/tiff .tif .tiff AddType application/x-font-ttf .ttf .ttc AddType application/vnd.ms-opentype .ttf .ttc AddType audio/wav .wav AddType audio/wma .wma AddType application/vnd.ms-write .wri AddType application/font-woff .woff AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw AddType application/zip .zip </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css A2678400 ExpiresByType text/x-component A2678400 ExpiresByType application/x-javascript A2678400 ExpiresByType application/javascript A2678400 ExpiresByType text/javascript A2678400 ExpiresByType text/x-js A2678400 ExpiresByType text/html A21600 ExpiresByType text/richtext A21600 ExpiresByType image/svg+xml A21600 ExpiresByType text/plain A21600 ExpiresByType text/xsd A21600 ExpiresByType text/xsl A21600 ExpiresByType text/xml A21600 ExpiresByType video/asf A31536000 ExpiresByType video/avi A31536000 ExpiresByType image/bmp A31536000 ExpiresByType application/java A31536000 ExpiresByType video/divx A31536000 ExpiresByType application/msword A31536000 ExpiresByType application/vnd.ms-fontobject A31536000 ExpiresByType application/x-msdownload A31536000 ExpiresByType image/gif A31536000 ExpiresByType application/x-gzip A31536000 ExpiresByType image/x-icon A31536000 ExpiresByType image/jpeg A31536000 ExpiresByType application/json A31536000 ExpiresByType application/vnd.ms-access A31536000 ExpiresByType audio/midi A31536000 ExpiresByType video/quicktime A31536000 ExpiresByType audio/mpeg A31536000 ExpiresByType video/mp4 A31536000 ExpiresByType video/mpeg A31536000 ExpiresByType application/vnd.ms-project A31536000 ExpiresByType application/x-font-otf A31536000 ExpiresByType application/vnd.ms-opentype A31536000 ExpiresByType application/vnd.oasis.opendocument.database A31536000 ExpiresByType application/vnd.oasis.opendocument.chart A31536000 ExpiresByType application/vnd.oasis.opendocument.formula A31536000 ExpiresByType application/vnd.oasis.opendocument.graphics A31536000 ExpiresByType application/vnd.oasis.opendocument.presentation A31536000 ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000 ExpiresByType application/vnd.oasis.opendocument.text A31536000 ExpiresByType audio/ogg A31536000 ExpiresByType application/pdf A31536000 ExpiresByType image/png A31536000 ExpiresByType application/vnd.ms-powerpoint A31536000 ExpiresByType audio/x-realaudio A31536000 ExpiresByType image/svg+xml A31536000 ExpiresByType application/x-shockwave-flash A31536000 ExpiresByType application/x-tar A31536000 ExpiresByType image/tiff A31536000 ExpiresByType application/x-font-ttf A31536000 ExpiresByType application/vnd.ms-opentype A31536000 ExpiresByType audio/wav A31536000 ExpiresByType audio/wma A31536000 ExpiresByType application/vnd.ms-write A31536000 ExpiresByType application/font-woff A31536000 ExpiresByType application/vnd.ms-excel A31536000 ExpiresByType application/zip A31536000 </IfModule> <IfModule mod_deflate.c> <IfModule mod_setenvif.c> BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html </IfModule> <IfModule mod_headers.c> Header append Vary User-Agent env=!dont-vary </IfModule> AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json <IfModule mod_mime.c> # DEFLATE by extension AddOutputFilter DEFLATE js css htm html xml </IfModule> </IfModule> <FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$"> FileETag None <IfModule mod_headers.c> Header set Pragma "public" Header append Cache-Control "public" Header unset ETag Header unset Set-Cookie </IfModule> </FilesMatch> <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$"> FileETag None <IfModule mod_headers.c> Header set Pragma "public" Header append Cache-Control "public" Header unset ETag </IfModule> </FilesMatch> <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|woff|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|WOFF|XLA|XLS|XLSX|XLT|XLW|ZIP)$"> FileETag None <IfModule mod_headers.c> Header set Pragma "public" Header append Cache-Control "public" Header unset ETag Header unset Set-Cookie </IfModule> </FilesMatch> # END W3TC Browser Cache # BEGIN W3TC Page Cache core <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^(.*\/)?w3tc_rewrite_test/?$ $1?w3tc_rewrite_test=1 [L] RewriteCond %{HTTP:Accept-Encoding} gzip RewriteRule .* - [E=W3TC_ENC:_gzip] RewriteCond %{HTTP_COOKIE} w3tc_preview [NC] RewriteRule .* - [E=W3TC_PREVIEW:_preview] RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} ="" RewriteCond %{REQUEST_URI} \/$ RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC] RewriteCond %{HTTP_USER_AGENT} !(W3\ Total\ Cache/0\.9\.4|acer\\\ s100|android|archos5|bada|bb10|blackberry9500|blackberry9530|blackberry9550|blackberry\\\ 9800|cupcake|docomo\\\ ht\\\-03a|dream|froyo|googlebot\-mobile|htc\\\ hero|htc\\\ magic|htc_dream|htc_magic|iemobile/7\.0|incognito|ipad|iphone|ipod|kindle|lg\\\-gw620|liquid\\\ build|maemo|mot\\\-mb200|mot\\\-mb300|nexus\\\ one|nexus\\\ 7|opera\\\ mini|s8000|samsung\\\-s8000|series60\.\*webkit|series60/5\\\.0|sonyericssone10|sonyericssonu20|sonyericssonx10|t\\\-mobile\\\ mytouch\\\ 3g|t\\\-mobile\\\ opal|tattoo|touch|webmate|webos|2\\\.0\\\ mmp|240x320|alcatel|amoi|asus|au\\\-mic|audiovox|avantgo|bb10|benq|bird|blackberry|blazer|cdm|cellphone|danger|ddipocket|docomo|dopod|elaine/3\\\.0|ericsson|eudoraweb|fly|haier|hiptop|hp\\\.ipaq|htc|huawei|i\\\-mobile|iemobile|iemobile/7|iemobile/9|j\\\-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg/u990|lge\\\ vx|midp|midp\\\-2\\\.0|mmef20|mmp|mobilephone|mot\\\-v|motorola|msie\\\ 10\\\.0|netfront|newgen|newt|nintendo\\\ ds|nintendo\\\ wii|nitro|nokia|novarra|o2|openweb|opera\\\ mobi|opera\\\.mobi|p160u|palm|panasonic|pantech|pdxgw|pg|philips|phone|playbook|playstation\\\ portable|portalmmm|\\bppc\\b|proxinet|psp|qtek|sagem|samsung|sanyo|sch|sch\\\-i800|sec|sendo|sgh|sharp|sharp\\\-tq\\\-gx10|small|smartphone|softbank|sonyericsson|sph|symbian|symbian\\\ os|symbianos|toshiba|treo|ts21i\\\-10|up\\\.browser|up\\\.link|uts|vertu|vodafone|wap|willcome|windows\\\ ce|windows\\\.ce|winwap|xda|xoom|zte) [NC] RewriteCond "%{DOCUMENT_ROOT}/test/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f RewriteRule .* "/test/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L] </IfModule> # END W3TC Page Cache core # BEGIN W3TC Skip 404 error handling by WordPress for static files <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(robots\.txt|([a-z]+)?-?sitemap.xsl|sitemap(_index)?\.xml(\.gz)?|[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?) RewriteCond %{REQUEST_FILENAME} \.(css|htc|less|js|js2|js3|js4|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|woff|xla|xls|xlsx|xlt|xlw|zip)$ [NC] RewriteRule .* - [L] </IfModule> # END W3TC Skip 404 error handling by WordPress for static files # 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
As with any plugin/theme troubleshooting, we’ll ask that you disable all other plugins to eliminate conflicts (including w3tc). If it begins working, re-enable them one-by-one to determine that source.
Your archive page is now redirecting back to /listings-index/. So again, something changed. Should have grabbed a screenshot earlier.
OK, so far I have tried disabling W3TC, WordPress SEO, and Simple Real Estate Pack. No help so far. Tonight I’ll try disabling all plugins and will report back.
OK, I deactivated all plugins except WP-Listings. Still the /listings/ archive page will not load. Here is a video showing just that: https://youtu.be/Is9Z0upg3qw
And I’ve posted the contents of my .htaccess above. What else could be the problem?
Something with your particular WordPress install. Create a new, clean instance of WordPress and install there.
Hmmm. This is a pretty darn new WP install, just a few months old. (I just moved hosts and had the new host do a clean WP install before the migration.) Everything else is working fine, just not the WP-Listings plugin. I can’t imagine what could go wrong with a WP install that would make only /listings/ redirect. If there’s nothing else it could be, I guess I’ll have the host install another WP instance and report back.
Yeah, there’s not much else we can do from this end because it’s localized to your specific setup. Seeing as you did have a redirect in there, it could be a remnant of that still hiding somewhere. Either way, after nearly 2000 downloads, you’re the first to report an issue like this, so it’s almost certainly not a plugin issue.
I see your latest update offers the ability to change the Listings post type slug to resolve such conflicts. Strange thing is, I’ve changed this multiple times (and yes, reset my permalinks each time) and I still get a 404 on the WP-Listings archive and on single listing pages. So it’s not simply a matter of some specific redirect hijacking the /listings/ directory. Very strange. Just thought I’d let you know in case that gives you any ideas on the subject.
- The topic ‘Single Listing page 404’ is closed to new replies.