Search the Community

Showing results for tags '404'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Found 20 results

  1. I've recently had a problem crop up with pages using a certain template that was working fine before. When I go to edit certain pages, I get returned to the same page I'm on, i.e. /processwire/page/edit/?id=XXXX but instead it displays the 404 template. And the data I'm entering or updating doesn't get saved. The template only has title, multiplier, table and file fields attached to it. And the table field is also modified by the TableCSVImportExport module. And it only seems to be happening to certain pages with this template, not all of them. :?
  2. I've got several Processwire websites running on a local server and an external server. With one of them I have the migration issue where anything but the homepage serves a 404 error. I've read pretty much all topics about the problem but can't seem to find a solution that works. Now in my situation, I request a new virtual domain ( for each website, and set an A record on our own domain ( The end result: So far so good, but only the homepage works. Subpages and the admin URL generate a 404. Most of the topics I read revolved around changing .htaccess but I've got similar websites running on the same testing server without any modifications. Example: I've checked the .htaccess file line by line and even copied the one from working website into the non-working one, but to no avail. I tried upgrading PW but that didn't help either. Uploading and accessing a php file works, and mod_rewrite is on. Link to phpinfo() result. The document root in my FTP client is as follows: /data/www/ I've tried uncommenting and changing the RewriteBase lines, tried both the full path as just '/public_html/', but unlike others there doesn't seem to change anything for me. I get the same plain 404 every time. Any ideas on what else I can try? Apart from a fresh installation? EDIT: I've just did a fresh install of PW 3.0.72 on the virtual domain, and it seems to have the same problem, I can't load the admin url.
  3. Hi All, I was playing around with the settings for various templates as I had created a new role and have inadvertantly locked myself out. I changed some of the settings on the Admin template, so I assume this is what has caused the lock out. I have direct access to the database but I have no idea what I would need to change in it to regain access. Probably also worth mentioning that all the existing pages are still accessible, but /processwire throws a 404.
  4. While coding some templates I need to throw some Wire404Exceptions, which, expectedly, sets correct headers and renders 404 page. Since all these exceptions are extending Exception class, I can call its constructor with a message like this <?php $demoName = sanitizer()->pageName(input()->urlSegment1); $demo = pages('template=demo, name=$sanitizedPagenameFrom'); if(!$demo->id) { throw new Wire404Exception("Demo named $demoName cannot be found, but check out its source page instead"); } // inside template 404.php // somehow get the error $message echo "<h1>Page does not exist</h1>" echo "<p>$message</p>" What I want to do is to somehow catch this exception, or get inside 404 template the message that I set earlier in some module or another function, so that I can notify the user with a better message than "Error 404: Page not found". There's some parts inside core that handles this sort of things but they're not utilized. <?php // inside /wire/core/ProcessPageView.php public function ___execute($internal = true) { // ... try { // try to render the page } catch(Wire404Exception $e) { return $this->pageNotFound($page, $this->requestURL, false, '404 thrown during render'); } // ... } protected function ___pageNotFound($page, $url, $triggerReady = false, $reason = '') { // reason is not used, or passed to 404 template } So, is there a way to manually catch the exception thrown? For instance, with Silex all exceptions can be intercepted using <?php $app = new Silex\Application(); $app->error(function (\Exception $e, $code) { exit('asd'); });
  5. Trying to deploy a PW site to a client's hosting provider. Everything works as expected in development, but on the production host, certain AJAX requests fail. Here's what I'm seeing: 1) I have form on every page which is submitted via AJAX POST to the current page. No matter which page you POST to, it always returns a PW 404 page. 2) AJAX image uploads on the back end return a 200 or 302 for the original request, then spawn a GET request for the homepage. In trying to troubleshoot this, I have found that the host has both suhosin and mod_security installed. They've provided me with a local php.ini to test configuration changes. I've added the following to .htaccess (temporarily): # account-specific php.ini file <IfModule mod_suphp.c> suPHP_ConfigPath /home/[username] <Files php.ini> order allow,deny deny from all </Files> </IfModule> # disable mod_security <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> In the php.ini file, I've set the following directives: suhosin.simulation = On always_populate_raw_post_data = -1 I've also set a specific directory for uploads: upload_tmp_dir = /home/[username]/tmp GD support is included. PW doesn't log any errors, even with $config->debug set to true. This is PW 2.7.3 on PHP 5.6.28. What else should I check?
  6. I have problems with some 404 URLs, that are not rendering the page_not_found template but the home page template instead. Normal URLs that don't exist like /this-page-does-not-exist are redirected to my 404 page without any problems. But for URLs like /cool-page%20abc /page&=123 /pagename'A the home page is rendered. But when i am checking the webdeveloper console, the return code is 404 Do i miss some configuration? Thank you
  7. I hid/set aside the old /wire/, index.php, and .htaccess, as well as /site/config.php. Debug=1. $config->urls->admin = /pw/, as it's set as. I'm finding that others are encountering a similar issue but haven't found any solution yet, at least none that works for me. Please help, thanks much
  8. try to get PW 3.0.30 up on Ubuntu 16.04 / nginx version: nginx/1.10.0 (Ubuntu) the installation works fine but afterwards only default page displays, any other throws a 404 error page. we looked at the PW on Ngnix on Howtoforge any idea, thanks nginx access.log shows: server { listen 80; server_name processwire; index index.php index.html; root /var/www/html/; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; default_type application/x-php; ### SECURITY - Protect crucial files location ~ /\. { deny all; } location ~ /(COPYRIGHT|LICENSE|README|htaccess)\.txt { deny all; } location ~ ^/site(-[^/]+)?/assets/(.*\.php|backups|cache|config|install|logs|sessions) { deny all; } location ~ ^/site(-[^/]+)?/install { deny all; } location ~ ^/(site(-[^/]+)?|wire)/(config(-dev)?|index\.config)\.php { deny all; } location ~ ^/((site(-[^/]+)?|wire)/modules|wire/core)/.*\.(inc|module|php|tpl) { deny all; } location ~ ^/(site(-[^/]+)?|wire)/templates(-admin)?/.*\.(inc|html?|php|tpl) { deny all; } ### GLOBAL REWRITE location /ProcessWire-devns { try_files $uri $uri/ /index.php?it=$uri&$args; } # pass the PHP scripts to FastCGI server on local socket # location ~ .+\.php((/|\?).*)?$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTP_MOD_REWRITE On; include fastcgi_params; } # redirect server error pages to the static page /40x.html error_page 404 /404.html; location = /40x.html { root /usr/share/nginx/html; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }
  9. When logged into the admin as the superuser, the 404 page appears in the page tree per usual. When logged in as a "site administrator" (a custom role), the 404 page is missing. The 404 page uses the basic-page template and hasn't been edited or altered in any way. Under "who can access this page", it shows the expected permissions (site administrators can definitely edit basic pages), and in fact, if a site administrator navigates directly to the edit screen for the page, it works fine. So it's not a permissions issue per se, it just doesn't show up in the page tree for users in that role. It is a multilingual site, and English is not the default language, in case that's relevant. Any thoughts?
  10. Good morning folks. I've been going around in circles since last week on this one. I've got caching turned off on my site, but, wondering if there is an extra step I need to take when publishing a page when using FacBook's social plugin? I've got a template for my news articles with FaceBook's social share plugin embedded. After publishing the page, going to the article on the front end on the site, and clicking share, the share dialog in many cases will have the right page content but frequently it comes up with my custom 404 page. FaceBook must be pinging back, in order to server up the custom 404, - so that seems to rule out the server blocking the ping-back. Using the FaceBook debugger I can Show Existing Scrape information and see that it had a 404 response. However, without changing anything on the site, if I use the debugger to re-scrape the page there is no 404 and the page comes right up. it seems as though even if the page is published and has been loaded in the browser when FaceBook calls back to my processwire site it's telling FaceBook the page doesn't exist. When this happens, I go over to the debugger, click re-scrape, and the page comes up fine -- but, I can't keep doing this all day long. (see the attached images) Any advice or help would be greatly appreciated. If it is any help I'm using Processwire 2.7.2 and Zurb Foundation 5
  11. Hello , We are developing a website where we have been facing a 404 Error on all new pages those are getting created. We are able to view all the pages those are already created. When we create a new page and try to access the page we get 404 , but we can access all the fields of the page in another page. Url of the page is also correct. Below are the troubleshooting steps we tried but failed to resolve the issue : a) We had procache enabled , so we were having the modifed .htaccess , we changed our .htaccess to original version didtributed alongwith processwire. b) We tried deleting few pages and then recreating them but didnot help in resolution. c) We also tried changing the server but it also didnot resolve the issue. * Rememeber the status of page is publish. Please assist in resolving the issue
  12. Hello, I am new to PW and can't figure out how to get it to work. I'm working on a project and decided to use something different than Wordpress for once. The install went perfectly fine, not a single error, but after that I got stuck at the basic home page. Navigating to the subpages of the Admin Panel leaves me at the 404 page. Now I did find other topics containing the same problem or something like it, but none of the suggested solutions worked for me. I am running Xampp 5.6.12-0 on OS X El Capitan (for what it's worth). In the htdocs folder I have a folder for the website which contains the Processwire files. So heres the current state: mode_rewrite is active/working. In http.conf I've set all the AllowOverride to AllowOverride All just so that I didn't pick the wrong one. My .htaccess file it recognized (I did the 'aklvjsdvdislaj' test ;] ) I read somewhere that it was better to comment these three, so I did: #Options -Indexes #Options +FollowSymLinks #Options +SymLinksifOwnerMatch I tried commenting/uncommenting these: # RewriteBase / # RewriteBase /my%20website/ # RewriteBase /~user/ Uncommenting the first one gets me redirected to the Xampp dashboard. The second one does nothing for me in this state except showing the same 404 page but if I change it, like adding /processwire/, I get Internal Server Error 500. And if I uncomment the third one I don't get the PW 404 page but the basic 404 page. So at this point I'm getting a little tired of putting so much effort into simply getting an CMS to work. But I do think Processwire is perfect for my current project. Thank you in advance, Roy
  13. Hi folks, I've set up some infinitescroll on manual trigger on a Journal section of my site, all fine and set up, but there's a slight issue that the 'Allow Page Numbers' isn't returning a 404 even when there isn't more 'pages'. So, the infinitescroll never fails... or stops. For example, I have a /journal/page1 which is fine, and has posts, and a /journal/page2 but then, technically, /journal/page3 shouldn't exist as all the last post is on page2, but even if I put /journal/page99 it still returns a page, rather than a 404. Looking at the tutorials, this is even the same for the tutorial: I know I need to build a throw new Wire404Exception(); into my template, but I am unsure how to manage this? Any thoughts? Thanks! R
  14. From a fresh installation of PW2.5 with a profile that I made I get the following error when trying to access the 404 page. Error: Exception: Table 'perfects_db.ProcessRedirects' doesn't exist (in /home/perfectserviceso/public_html/wire/core/Database.php line 114) #0 [internal function]: Database->query('SELECT id, redi...') #1 /home/perfectserviceso/public_html/wire/core/DatabaseMysqli.php(35): call_user_func_array(Array, Array) #2 /home/perfectserviceso/public_html/site/modules/ProcessRedirects/ProcessRedirects.module(261): DatabaseMysqli->__call('query', Array) #3 /home/perfectserviceso/public_html/site/modules/ProcessRedirects/ProcessRedirects.module(261): DatabaseMysqli->query('SELECT id, redi...') #4 /home/perfectserviceso/public_html/wire/core/Wire.php(411): ProcessRedirects->checkRedirects(Object(HookEvent)) #5 /home/perfectserviceso/public_html/wire/core/Wire.php(344): Wire->runHooks('pageNotFound', Array) #6 /home/perfectserviceso/public_html/wire/modules/Process/ProcessPageView.module(179): Wire->__call('pageNotFound', Array) #7 /home/perfectserviceso/public_html/wire/modules/Process/ProcessPageView.module(179): ProcessPageVi This error message was shown because you are logged in as a Superuser. Error has been logged. Can anyone see if something is missing here?
  15. I downloaded an existing processwire project to my mac, modified it a bit, and tried to upload it to a new "GoDaddy" server. The home page is loaded fine, and links to pages on that server that doesn't use the processwire system also works, but all the links that use the processwire system leads to "404 not found" error. No matter if try to get to them as links, or to type the address manually. It's like the server doesn't recognise that "www.MySite/newPage" should look for the "newPage" in the processwire directory, and it's trying to find a file names "newPage", in the root directory, that obviously doesn't exist. (Another point - running the project on MAMP server on my mac works fine). Any suggestions? Thanks.
  16. Hi guys, having a bit of a strange issue here - I've installed at least a dozen copies of process wire for various websites firstly on my localhost using MAMP and later transferring it to a server. I'm trying to install a fresh copy to my localhost, I go through the install process and get the success message as usual (see screenshot) but whenever I try to access /admin/ - it cannot be found. Any ideas?
  17. Hello, I exported a profile of a running live site (PW 2.5.2) with ProcessExportProfile module. Then cloned latest stable branch 2.5.3 to my local vagrant box dev server, copied the exported profile folder into PW root and installed. Everything went smoothly so far. All my templates, fields, modules and template files are there. I can access all but one specific page of my site. That page always throws a 404 error. The page sits under /profile and has template userprofile assigned. It is published and not hidden. The template file site/templates/userprofile.php is there. Only difference to the working pages is that this /profile page requires login before it can be accessed. After successful login the user is redirected to the /profile page with if($user->isLoggedin()) $session->redirect($pages->get('/profile')->url); But also if I enter the URL path manually, I get the 404 error. On the live site /profile only throws a 404 if you enter the URL path manually and are not logged in. So on my local install the /profile page acts as if the user was not logged in even if the user is logged in. I checked that the user really is logged in with if($user->isLoggedin()) echo "LOGGEDIN"; and has the correct roles with if($user->isLoggedin()) echo $user->roles; I haven't made any changes to my userprofile.php or any other files in the fresh install. And the code in there is working perfectly fine on the live site and on a copy of the live site that runs in the same dev environment as the site I'm having problems with. Now I'm really lost and don't know which steps to take for debugging this (debug is set to true in config.php - no messages or errors). Any help would be greatly appreciated. EDIT: I also installed the site on a different non local server to be able to rule out server environment issues. But same behaviour. Still get 404 for profile site
  18. Hello guys I'm new here! I've been working on this website that I've made with Foundation. I wanted to put a CMS in it so now i'm here! On my localhost the website works perfect. I've adjusted the Processwire CMS to my wishes and with /login I and other users would be able to change the texts on the website. So I thought I was ready to put it live. I exported the MySQL files. Created a new db. Imported everything. And via an FTP client uploaded all the files. The homepage works fine. But now whenever I want to login using /login which I changed /processwire to I get a 404 error: Not FoundThe requested URL /login was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. What am I doing wrong here? I've checked a lot of messages on this forum about the .htaccess file but I haven't got it to work yet and need help from more experienced PW users:) This is my website: http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # ----------------------------------------------------------------------------------------------- # Access Restrictions: Protect ProcessWire system files # ----------------------------------------------------------------------------------------------- # Block access to any htaccess files RewriteCond %{REQUEST_URI} (^|/)\.htaccess$ [NC,OR] # Block access to protected assets directories RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) [OR] # Block acceess to the /site/install/ directory RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/install($|/.*$) [OR] # Block dirs in /site/assets/ dirs that start with a hyphen RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets.*/-.+/.* [OR] # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php RewriteCond %{REQUEST_URI} (^|/)(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ [OR] # Block access to any PHP-based files in /templates-admin/ RewriteCond %{REQUEST_URI} (^|/)(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ [OR] # Block access to any PHP or markup files in /site/templates/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ [OR] # Block access to any PHP files in /site/assets/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets($|/|/.*\.php)$ [OR] # Block access to any PHP files in core or core module directories RewriteCond %{REQUEST_URI} (^|/)wire/(core|modules)/.*\.(php|inc|tpl|module)$ [OR] # Block access to any PHP files in /site/modules/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ [OR] # Block access to any software identifying txt files RewriteCond %{REQUEST_URI} (^|/)(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ [OR] # Block all http access to the default/uninstalled site-default directory RewriteCond %{REQUEST_URI} (^|/)site-default/ # If any conditions above match, isssue a 403 forbidden RewriteRule ^.*$ - [F,L] # ----------------------------------------------------------------------------------------------- # Ensure that the URL follows the name-format specification required by ProcessWire # ----------------------------------------------------------------------------------------------- RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" # ----------------------------------------------------------------------------------------------- # If the request is for a file or directory that physically exists on the server, # then don't give control to ProcessWire, and instead load the file # ----------------------------------------------------------------------------------------------- RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !(favicon\.ico|robots\.txt) # ----------------------------------------------------------------------------------------------- # OPTIONAL: Prevent ProcessWire from attempting to serve images or anything in /site/assets/. # Both of these lines are optional, but can help to reduce server load. However, they # are not compatible with the $config->pagefileSecure option (if enabled) and they # may produce an Apache 404 rather than your regular 404. You may uncomment the two lines # below if you don't need to use the $config->pagefileSecure option. # ----------------------------------------------------------------------------------------------- # RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|ico)$ [NC] # RewriteCond %{REQUEST_FILENAME} !(^|/)site/assets/ # ----------------------------------------------------------------------------------------------- # Pass control to ProcessWire if all the above directives allow us to this point. # For regular VirtualHosts (most installs) # ----------------------------------------------------------------------------------------------- RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] # ----------------------------------------------------------------------------------------------- # 500 NOTE: If using VirtualDocumentRoot: comment out the one above and use this one instead. # ----------------------------------------------------------------------------------------------- # RewriteRule ^(.*)$ /index.php?it=$1 [L,QSA] </IfModule> ################################################################################################# # END PROCESSWIRE HTACCESS DIRECTIVES ################################################################################################# What am I doing wrong? Thanks in advance! htaccess.txt
  19. I've just come across a really strange problem where processwire is throwing a 404 error after I enter a value into one of my fields. I'm sure this is probably down to my code. I have a set of fields that when a value is entered some output is echoed to my template. Every field works as expected except the last field which throws the 404 after entering a value and saving the page. Here's the code. <?php $settings = $pages->get("/site-settings/"); if ($settings->social_facebook) echo "<li><a class='icon-small small-icon-facebook' href='{$settings->social_facebook}' target='_blank'></a></li>"; if ($settings->social_twitter) echo "<li><a class='icon-small small-icon-twitter' href='{$settings->social_twitter}' target='_blank'></a></li>"; if ($settings->social_linkedin) echo "<li><a class='icon-small small-icon-linkedin' href='{$settings->social_linkedin}' target='_blank'></a></li>"; if ($settings->social_youtube) echo "<li><a class='icon-small small-icon-youtube' href='{$settings->social_youtube}' target='_blank'></a></li>"; if ($settings->social_picasa) echo "<li><a class='icon-small small-icon-picasa' href='{$settings->social_picasa}' target='_blank'></a></li>"; if ($settings->social_upon) echo "<li><a class='icon-small small-icon-stumble' href='{$settings->social_upon}' target='_blank'></a></li>"; ?> I'm guessing there's a better way to write this but not quite sure why it's throwing an error. I've tried deleting and recreating the last field with a different name but it still throws the same error. Can anyone help?
  20. Hi, while exploring PW from the filesystem I've found 'Http.php' and as of my difficultys when starting with PW, I was wondering why not sending a HTTP-HEAD-Request to the admin-page-url at the end of the install process and inform the user if .htaccess isn't configured the right way. So, I was a bit wiser after opening the class-file: there was no support in it for HEAD, only GET and POST. As I've build a own http-client-class a hundred years ago, it was not much work to implement the HEAD-method as well. (added 1 Line) Maybe it should be added a http->status(url-to-adminpage)-check at end of install-routine to inform the user if it responses other than 200. (at least a link to apropriate forum-topic or provide direct information how to solve that) ---- Edit/Added: Every few days a new user run into same problem look at this post and the following two. (I really can feal the pain he has). And all the helpful people here try to explain how to solve it everytime and again and again. So, if it is not a kind of test to new users, the install-routine should solve that for them, and other as I've mentioned above, it should/could be done in the background, because everything needed is the .htaccess-file which is created by PW itself and some HTTP-Requests. If default install is 404 for admin page: compare $_SERVER['DOCUMENT_ROOT'] with install folder of PW and write appropriate Path as RewriteBase into .htaccess-file and check again. If it responses '200 OK' now, - fine. If not, - tell user that there are Problems with this and point him to Forum-FAQ. So, if it is actually a test to the new users weakness or strength with stressy situations, ok - any admin/moderator should silently delete this post and I never will ask again. ---- --- In API I have not found how we can use the WireHttp-class, (Searchphrases like HTTP and Request etc are not very useful) Can someone point me to it please?