Jump to content

artaylor

Members
  • Posts

    56
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,776 profile views

artaylor's Achievements

Full Member

Full Member (4/6)

20

Reputation

2

Community Answers

  1. Hi @Mithlesh, It depends on how the HTML for the icons is being generated. If they are hard-coded, then @Edison is correct and you can look at his solution. If, on the other hand, they are being generated by template code from data stored in the database (this is how I tend to build it so that the client can modify the social icons without me) then you will need to look a little deeper. Check the code that generates the icons (_main.php is likely) and see if it calling the PW API. If so, it will show you where to go in the admin.
  2. @Robin S Adding the slash at the end worked. You rock and my remaining strand of hair thanks you immensely for your prompt, working reply!
  3. Hi, I have a site the interfaces with a payment processor. As transactions happen on the processor, it automatically calls endpoints on my application and passes a JSON body with the details. Working for a few hours with the payment processor support team we have figured out that the problem is the the endpoint is returning a 301 which they cannot handle. It is also converting the POST to a GET. I thought it was due to the PagePathHistory module as at one point I did move the page to a new location in the tree. However, I have since then tried the following: Moved it back to the original place. Deleted and recreated Deleted and changed the name Truncated the page_path_history table in the database However, I am still getting a 301 and my log file still shows a GET request. Here is the code for the New Subscription endpoint wire()->log()->save('ccbill', 'Add New Subscription Started'); wire()->log()->save('ccbill', 'Request Method: ' . $_SERVER['REQUEST_METHOD']); $ccBillData = json_decode(file_get_contents('php://input'), true); // get the JSON encoded data and convert to PHP array if ($ccBillData !== NULL) wire()->log()->save('ccbill', "Data: " . var_dump($ccBillData)); $ccBillIntegration = modules()->get('CcbillIntegration'); $ccBillIntegration->addNewSubscription($ccBillData); And the results in the log file when I use an API Tester to POST to the endpoint with some JSON 2019-04-30 22:41:51 guest http://site/subscription-new/ Add New Subscription Started 2019-04-30 22:41:51 guest http://site/subscription-new/ Request Method: GET Any and all help is appreciated. I have no hair left to pull out...
  4. @teppo Thank you. I didn't even notice the subforum until just now. Will be more careful in the future. ?
  5. Strange limitation but an easy fix. @BitPoetThanks for the fast reply!
  6. Hi, This is my first attempt to write a PW module. I have built dozens of sites without writing my own modules, but figured it is time to up my PW game. I assume this is a stupid noob error, but I get the "Invalid Module Name" error in admin when I refresh the modules list. Name of class: CCBillIntegration, Name of Module file: CCBillIntegration.module Full extent of .module file: <?php namespace ProcessWire; class CCBillIntegration extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array */ public static function getModuleInfo() { return array( 'title' => 'CCBill Integration', 'version' => "0.1.0", 'summary' => 'A module to allow CCBill payment processing and user management integration.', 'singular' => true, 'autoload' => true, 'icon' => 'credit-card' ); } } Thanks.
  7. LOL. Well there you go. Assumption once again leading to mistakes...
  8. @adrian You are likely correct. I did not do any real testing. However, as an interesting note, when I posted my previous message you can see the url to youtu.be as a url, however, the link to the video using youtube.com actually embedded the video. So, I have to assume that the forum is using the plugin and it did not show the shortened version.
  9. @strandoo Not sure if this would help, but I notice you are using the short form url on the second example (that does not work) of https://youtu.be/LBY12usmYAA, have you tried using the actual youtube url (which I cannot link to here because it embeds the video)?
  10. @horst Thank you. I will give these a read. I appreciate the help. This forum and the PW users are one of PW's biggest assets.
  11. @BitPoet Thanks for the info. While I have built a few PW sites, I have not had to go much beyond installing some modules and doing basic PW things. I have not gotten to the level of using the API to add data, etc, so if you don't mind sharing a quick snippet of the "import" routine, I would appreciate it. I don't want to take too much of your time, so please ignore this request if it is a lot of time and energy. Cheers
  12. @BitPoet Thousands of rows in one main table that has a dozen or so support tables that would be linked via a Page field in PW.
  13. Hi, I have a project that, based on initial specs, I decided to build in another framework due to the client wanting the ability to regularly import data from an existing manufacturing system. I decided a platform that would allow me to match the imported data to the system would make sense. Since then, the project has morphed (I know, it never happens) and the regular import is unnecessary and so a comprehensive admin is needed. I want to switch to PW but don't want to have to manually link thousands of tables. I have the import routine working for the main table but I am not sure how to import the support tables and automatically create the page fields for them. Oh, in case it matter, the links are not autoincrement id fields, but character codes. Eg. Category table - code: TRN, description: Transportation If someone can point me in the right direction it would be much appreciated.
  14. Cool looking module. I have a question based on my take on PW philosophy. Also, I just had to do some work on a WP site and it took me forever to find some content as it was buried in the Theme admin not WP admin. So, my question is: Is it a good idea to put client editable content outside of the PW database? Now, I and anyone else who is unfortunate enough to have to work on a PW site I create, must know that there is some data in the DB and some in some JSON or PHP files in the template folder... Plus, it does not get backed up with the rest of the data... This is just a question. I go through the process of creating a Settings Page every site, so I do love the idea of something that makes it easier. Keep up the great work!
×
×
  • Create New...