Jump to content

shadowmoses

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

shadowmoses's Achievements

Jr. Member

Jr. Member (3/6)

3

Reputation

  1. I've decided to just create a custom module for this functionailty, still have no idea what the white page is all about though.
  2. Yes the folders are currently identical, templates-dev is an exact clone of templates (which is working just fine). I'm puzzled why its not working...
  3. Hi, I'm trying to serve a different templates folder depending on the domain name. For example sub.domain.com would load a use a templates-dev folder. I have got this working with the following code which I found on these forums: // Map domains to template folders $config->templates = [ $production_url => 'templates', // Production templates $sub_url => 'templates-dev', // Sub templates ]; // Set template paths dynamically based on HTTP_HOST if (isset($_SERVER['HTTP_HOST']) && isset($config->templates[$_SERVER['HTTP_HOST']])) { $folder = $config->templates[$_SERVER['HTTP_HOST']]; $config->urls->templates = "/site/$folder/"; $config->paths->templates = dirname(__DIR__) . $config->urls->templates; } I've also added the sub domain in the allowed hosts in the config, as follows: $config->httpHosts = array('www.domain.com', 'sub.domain.com'); This seems to work fine, apart from one slight issue... The home page is blank, but returns a 200 status code. All other pages work fine. I just can't work out why this is happening. There are no errors in the logs or anything. Nothing to indicate a problem. I'm stumped to why this is happening. Is there a better way to do this? Thanks in advance.
  4. FIXED! The error was because of a module I have developed 🤣 I've been coding for 14 hours and can't believe I missed it...well I can haha!
  5. Hello, I urgently need assistance. I was using the ModulesManager module to install a new module, but the installation failed. Now, I'm encountering an error in ProcessWire that affects both the admin panel and the front end of the website. This issue has never occurred before, and I'm unsure what went wrong. Thanks in advance What the… Error: Exception: Unrecognized operator: * (in wire/core/Selectors.php line 416) #0 wire/core/Selectors.php (250): Selectors->extractOperators('') #1 wire/core/Selectors.php (147): Selectors->extractString('') #2 wire/core/Selectors.php (132): Selectors->setSelectorString('template=*') #3 wire/core/Selectors.php (112): Selectors->init('template=*') #4 wire/core/PageComparison.php (221): Selectors->__construct('template=*') #5 wire/core/Page.php (3207): PageComparison->matches(Object(BlogPage), 'template=*') #6 wire/core/PageComparison.php (86): Page->matches('template=*') #7 wire/core/Page.php (3246): PageComparison->is(Object(BlogPage), 'template=*') #8 wire/core/ModulesLoader.php (276): Page->is('template=*') #9 wire/core/ModulesLoader.php (231): ModulesLoader->triggerConditionalAutoload() #10 wire/core/Modules.php (350): ModulesLoader->triggerReady() #11 wire/core/ProcessWire.php (787): Modules->triggerReady() #12 wire/core/Wire.php (413): ProcessWire->___ready() #13 wire/core/WireHooks.php (968): Wire->_callMethod('___ready', Array) #14 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessWire), 'ready', Array) #15 wire/core/ProcessWire.php (909): Wire->__call('ready', Array) #16 wire/core/ProcessWire.php (668): ProcessWire->__call('ready', Array) #17 wire/modules/Process/ProcessPageView.module (511): ProcessWire->setStatus(4, Array) #18 wire/core/Wire.php (413): ProcessPageView->___ready() #19 wire/core/WireHooks.php (968): Wire->_callMethod('___ready', Array) #20 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'ready', Array) #21 wire/modules/Process/ProcessPageView.module (165): Wire->__call('ready', Array) #22 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(BlogPage), Object(PagesRequest)) #23 wire/core/Wire.php (416): ProcessPageView->___execute(true) #24 wire/core/WireHooks.php (968): Wire->_callMethod('___execute', Array) #25 wire/core/Wire.php (484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #26 index.php (55): Wire->__call('execute', Array) #27 {main} This error message was shown because: you are logged in as a Superuser. Error has been logged.
  6. Okay I've worked something out..... The redirects only work when I'm logged in! Why would this be? I've never seen this happen before. The page is viewable to everyone/guests, so its not hidden behind any user login or strict permissions etc Thank you
  7. On mobile it just doesn't redirect. I've checked and cleared all caches, I've also tried different mobiles and I still get the same behaviour. It really doesn't make any sense Thank you
  8. Hey everyone, I'm having a very strange problem with a website I'm developing. Basically no redirects are working when I view the website on a mobile device, but yet they work fine on a computer. For example I'm using the below code $session->redirect($page->child()->url); But it only works on my computers. I've even installed the Jumplinks module and its doing exactly the same thing with any redirect I create! I'm really confused as there is nothing differently displayed or configured for mobile devices, that would cause this. Can anyone suggest anything I may have overlooked? Thanks in advance.
  9. Wow that is perfect! Can't believe I didn't think of that ? I forgot you could have a repeater in a repeater! I'll use the method without ProFields first, as my client has run out of budget! When funds permit I will purchase the ProFields agency package, as it looks very useful for future projects anyway. Thank you so much for your time!
  10. Hi, I've been out of touch with Process Wire for sometime and now picked it back up. So my brain is struggling to come up with the best, optimised way to create a fees table for the front end, that is easily editable in the admin panel. I've attached a screenshot, of what will be displayed on the front end. Ideally it needs to be as simple as possible for my client to edit. I would really appreciate some advice here, as I think I have been over thinking it all and now seem to have a mental block! I hope this makes sense, thank you in advance!
×
×
  • Create New...