Jump to content

Peter Knight

Members
  • Posts

    1,375
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Peter Knight

  1. Hi 

    Is there a field type in the Core which will allow be to select one (or more) files within the PW file system?

    For context...

    I want to create two stand-alone PHP files which contain simple HTML as follows

    • Call-to-Action-01.php would be <h2>Call us</h2>
    • Call-to-Action-02.php would be <h2>Email us</h2>

    These would be stored within the PW /templates directory (I think).

    I then want to use RepeaterMatrix to select one or both and output them into my template where necessary.

    I was then looking at the $files->render() method and have the following working

    <?php $string = $files->render($Call-to-Action01.php); ?>

    So that's a good start but now how to select ?

    Thanks ?

     

     

  2. On 1/23/2022 at 12:01 AM, Guy Incognito said:

    Thanks ?.

    I will check out RockSEO. The thing that has kept us on MarkupSEO to date is the simplicity for implementation and also for clients. Combined with the changes you’ve made previously it’s pretty effective at doing what it needs to.

    I’ll have a think if there’s anything else that can be done to improve it further.

    Is RockSEO an upcoming Module by the community or a paid Pro Module?

  3. @Mike Rockett

    I'm getting an error on an install as follows:
     

    Quote

    Failed to init module: ProcessJumplinks - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'last_hit'

    It only affects the admin/back-end but wondered if there was a sensible way to fix?

    The only change I made recently to the Module was to stop logging 404 errors and possibly an upgrade of the Module too.

    Many thanks

     

     

  4. Hi Mike.

    I was having issues with a site recently where the database seemed to baloon in size (98 MB) and I tracked it down to the Jumplinks Module.

    I think the culprit is the 404 monitor which only displays the latest 100 but might possibly keep a record of everything?

    After logging into the Jumplinks admin area and clearing the 404 records, the table is back down to a few kb.

    Actually, my entire database is down from 103 MB to 5 MB

    Is there a way to prevent this instead of manually clearing the 404 recording? Assuming this is the culprit...

    Thanks

     

    • Like 1
  5. In MSN, we have the ability to adjust the inner template by editing this:

    <div class="uk-navbar-dropdown"><ul class="uk-nav uk-navbar-dropdown-nav">||</ul></div>

    This affects all the drop-down menus on my page (which is great).

    But what is you want to just target the output of a single dropdown?

    I have a requirement to inject just one of my drop down menus with a 'special link' (just some html)

    Quote

    Fruit
    - page 1
    - page 2
    - page 3

    Colours
    - page A (ID 1398)
    - page B
    - page C
    - special link

    I made some progress by creating a conditional check

    <?php
     if($page->id == 1398)
    	$txt3 = "special link";
     ?>

    and then adjusting the drop down template to...

    <div class="uk-navbar-dropdown">
      <ul class="uk-nav uk-navbar-dropdown-nav">||
      '.$txt3.'
      </ul>
    </div>

     but then I realise that it injects my special link into all the drop downs and I just want to appear for the drop down of Colours.

    Can anyone point me in the right direction keeping in mind my basic (very) PHP skills?

    Thanks
    BTW I know @Soma is the author here of the Module but following his beautiful artwork on Instagram, I'm not sure if he's in the web dev industry anymore?

     

     

  6. Hi 
    I have a list of pages all based on the same template but I want to exclude 2 by page ID

    
    $expertises = $pages->find("template=case-type, sort=sort");
    foreach ($expertises as $expertise);

    I know I could change their template or add an exclude checkbox to the template etc

    Wondering if there is a page=not(4989,9877) type of thing in the API to exclude pages by ID?

    I can't find anything in the API docs but think I may be searching for the wrong phrase.

    Thanks

  7. Hey I'm building my first new site in well over a year and am a little rusty on selectors but particularly retrieving sub-fields of selected pages.

    I am trying to output the meta data of a blog post as follows.

    Quote

    Posted by [Person Name], [Job title].

    [Person Name] is just a field with a Page Reference and simple enough.
    [Job Title] is the sub-field within the page that was referenced above.

    I actually have it working with the following:

    Posted by:
    
    <?php
    	if($page->insight_author) {
    	echo $page->insight_author("<a href='{url}'>{title}</a>");}
    ?>
    ,
    <?php
    	$roles = $page->insight_author;
    	foreach ($roles as $role) {
    	echo "{$role->staff_role}";} 
    ?>

    but was wondering how to do this with selector sub-selectors instead. My current code is probably quite 'old school'?

    Thanks

     

  8. Hi all
    I'm moving a site to a new server and getting the dreaded but common error
     

    Quote

    ProcessWire: ProcessLogin: This request was aborted because it appears to be forged.

    I can access the front-end and internal pages so the .htaccess is working. I cannot see any images on the site although I can access them directly if I put their absolute URL into a browser.

    As is this a new VPS, I hunted around for some obvious server-level settings etc which may have been overlooked.

    To rule out any issued caused by a site move, I also tried a fresh install. That fresh install has the same problem when trying to access the front end.

    Quote

    ProcessWire: ProcessLogin: This request was aborted because it appears to be forged.

    I have also been around the forums several times for similar threads and the largely contain recommendations about CHMOD. I believe I have tried most of these too.

    What is the latest thinking about this error?

    Many thanks, P

  9. Can anyone tell me which .htaccess directive might be blocking a site import feature from scanning my public_html folder and listing all files and folders.

    These would be both PW files/folders but also some non PW folders which my PW site references for media.

    Latest .htaccess file on Github

    I can see various options from Section 15 onwards (# 15. Access Restrictions (v301)) but nothing that would block both SSH and FTP scans my VPS site import file uses.

    When I point the same site import tool at a non PW site on the same directory it works.

    I could disable htaccess temporarily but it's a busy and active site.

    Thanks

    P


     

     

  10. Hi Adrian
    I was updating my site a few minutes ago and it started displaying a 500 error. When I turned on notifications, I saw the following error.

    Fatal error: Cannot declare class TracyDebugger, because the name is already in use in /home/p752009485/public_html/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php on line 19

     

    Is it ok to manually remove the Module somehow?

  11. Thanks @kongondo

    I found a fix for it although I don't understand the issue root cause.

    Discovered that editing the page url slug fixes this. Even if I just add an extra letter. Once the page saves, I can view it.

    Not wanting to have to do this manually to 50+ pages, I wondered what would happen if I changed the name (Settings > Name) of the parent for the 50 posts. That worked too and seems to have 'fixed' the 50 pages.

    It must be something related to the Page Path History module or something similar.

    • Like 1
  12. Hi guys

    is there a checklist of items I should consider for diagnosing a series of pages which display a 404 error?

    Basically I have built a Blog and all my posts are under a folder called 'Posts'. Some of these pages successfully display while others display a 404 page. 

    This is what I have confirmed so far...

    1. All pages are within the same root folder 'Posts'
    2. All pages have the same template and fields completed
    3. All pages have the same properties under Settings > Who can access this page
    4. Pages have no redirects in place
    5. Pages have no special characters or anything funky in the URL slug

    There are no errors showing in the log either so I am stuck ?

    Thanks

  13. Hi all

    My .htaccess file is correctly redirecting all requests to

    1. https://
    2. www.

    That's great until I want to work locally.

    I thought I had seen a blog post by Ryan where there was a new config setting to ignore both of these if working from localhost?

    I can't find it now so wondering if I was imagining ?

     

     

  14. If an image is added to a site via the rich text field, do we have a way to apply a custom wrapper or mini template to it?

    IE I want to apply some markup srcset to some user added images. I can only seem to achieve this when the image markup is in the template itself.

    https://github.com/rolandtoth/MarkupSrcSet/wiki

    I can probably achieve this with RepeaterMatrix and by creating a specific Images field (and images template) but outside of that ?

    Thanks

  15. 25 minutes ago, jonatan said:

    Do you know what CRM solution they ended up using? ?

    They ended up using SugarCRM as the cost of HubSpot was too expensive. But they never used the SugarCRM API (if there is one) so it was just a stand alone service with no real website integration. Sure, the webforms went into their SugarCRM database but it was a PITA and client regretted using SugarCRM too. The UX/UI was pretty poor.

  16. 10 hours ago, jonatan said:

    Old Post but.. Any news since 2018 on this? 

    I have an upcoming client which say that they need to run WP because of Hubspot CRM integration... I haven't been given any further clues though about exactly why though yet.. Anyone using it or similar? ?

    Probably due to some plug in they believe they need.

    My own client never signed up to HubSpot in the end.

    • Thanks 1
  17. Hi

    One of my clients says that they created a new news item and that subsequently all their previous news items disappeared (front end and back-end)

    The first thing I usually do here is to

    1. check the backend and see if they mistakenly set the wrong template on a folder 
    2. check the Trash folder for any deleted items
    3. search the entire PW backend for stray news items in the folders they should not be in

    In all three instances I cannot find any evidence of these news items on their live server.

    Any tips on where I might be failing to look? Unfortunately, I don't have any type of activity / changes log module installed.

    On a side note, a backup I have from last week has the full list of news items pages. Ultimately I can just restore this but I'd prefer to do a little digging first.

    Thanks

×
×
  • Create New...